Package: matlab.io.hdf4.sd
Index value of named data set
idx = nameToIndex(sdID,sdsname)
idx = nameToIndex(sdID,sdsname)
returns
the index of the data set with the name specified by sdsname
.
If there is more than one data set with the same name, the routine
returns the index of the first one.
This function corresponds to the SDnametoindex
function
in the HDF C API.
import matlab.io.hdf4.* sdID = sd.start('sd.hdf','read'); idx = sd.nameToIndex(sdID,'temperature'); sd.close(sdID);