Skip to Main Content Skip to Search
Product Documentation

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');

See Also

h5info | h5writeatt

Tutorials

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS