matlab.io.hdf4.sd.findAttr
Namespace: matlab.io.hdf4.sd
Index of specified attribute
Syntax
idx = findAttr(objID,attrname)
Description
idx = findAttr(objID,attrname)
returns the index of the attribute
specified by attrname
. The objID
input can be either an SD
interface identifier, a dataset identifier, or a dimension identifier.
The function corresponds to the SDfindattr
function
in the HDF library C API.
Examples
import matlab.io.hdf4.* sdID = sd.start('sd.hdf'); idx = sd.findAttr(sdID,'creation_date'); data = sd.readAttr(sdID,idx); sd.close(sdID);