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.

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

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?