Main Content

MATLAB (H5ML)

MATLAB Utility functions not part of HDF5 C library

Description

Use the MATLAB® HDF5 utility functions, H5ML, for convenience operations, such as comparing two HDF5 values and viewing the list of HDF5 constants and supported library functions. The MATLAB utility functions are not part of the HDF5 C library.

Functions

H5ML.compare_values

Numerically compare two HDF5 values

bEqual = H5ML.compare_values(value1,value2) compares two values, where either or both values may be specified by their text representation (for example, 'H5T_NATIVE_INT'). The values are compared numerically.

 Details

H5ML.get_constant_names

Constants known by HDF5 library

names = H5ML.get_constant_names() returns a list of known library constants, definitions, and enumerations. When these names are supplied as actual parameters to HDF5 functions, they are automatically be converted to the appropriate numeric value.

H5ML.get_constant_value

Value corresponding to a string

value = H5ML.get_constant_value(constant) returns the numerical value corresponding to the specified HDF5 enumeration or identifier.

 Details

H5ML.get_function_names

Functions provided by HDF5 library

names = H5ML.get_function_names() returns a list of supported library functions.

H5ML.get_mem_datatype

Datatype for dataset ID

dtypeID = H5ML.get_mem_datatype(locID)returns the identifier of an HDF5 memory datatype for the dataset or attribute identified by locID. This HDF5 memory datatype is the default used by H5D.read or H5D.write when you specify 'H5ML_DEFAULT' as a value of the memory datatype parameter. The identifier returned by H5ML.get_mem_datatype should eventually be closed by calling H5T.close to release resources.

Examples

expand all

val = H5ML.get_constant_value('H5T_NATIVE_INT');
H5ML.compare_values(val,'H5T_NATIVE_INT')
file_id = H5F.open('example.h5','H5F_ACC_RDONLY','H5P_DEFAULT');
dset_id = H5D.open(file_id,'/g1/g1.1/dset1.1.1');
datatype_id = H5ML.get_mem_datatype(dset_id)
H5T.close(datatype_id);
H5D.close(dset_id);
H5F.close(file_id);
a = H5ML.get_constant_value('H5T_NATIVE_INT');
Introduced before R2006a