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

h5readatt

Read attribute from HDF5 file

Syntax

attval = h5readatt(filename,location,attr)

Description

attval = h5readatt(filename,location,attr) retrieves the value for the named attribute attr from the given location in the HDF5 file filename.

Input Arguments

filename

Text string specifying the name of an HDF5 file.

location

Text string specifying the full path of the attribute in an HDF5 file. location can refer to either a group or a data set.

attr

Text string specifying the name of an attribute in an HDF5 file.

Output Arguments

attval

Value of the attribute.

Examples

Read a group attribute.

attval = h5readatt('example.h5','/','attr2');      

Read a data set attribute.

attval = h5readatt('example.h5','/g4/lon','units');
Was this topic helpful?