Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

H5T.equal

Determine equality of data types

Syntax

output = H5T.equal(type1_id,type2_id)

Description

output = H5T.equal(type1_id,type2_id) returns a positive number if the data type identifiers refer to the same data type, and zero to indicate that they do not. A negative value indicates failure. Either of the input values could be a character vector specifying an HDF5 data type.

Examples

Determine if the data type of a dataset is a 32-bit little endian integer.

fid = H5F.open('example.h5');
dset_id = H5D.open(fid,'/g3/integer2D');
dtype_id = H5D.get_type(dset_id);
if H5T.equal(dtype_id,'H5T_STD_I32LE')
    fprintf('32-bit little endian integer\n');
end

See Also

Was this topic helpful?