Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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

Character vector specifying the name of an HDF5 file.

location

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

attr

Character vector specifying the name of an attribute in an HDF5 file.

Output Arguments

attval

Value of the attribute.

Examples

collapse all

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

  2×2 int32 matrix

   0   2
   1   3

Read the units attribute.

attval = h5readatt('example.h5','/g4/lon','units')
attval =

degrees_east

Related Examples

See Also

|

Introduced in R2011a

Was this topic helpful?