matlab.io.hdf4.sd.fileInfo
Package: matlab.io.hdf4.sd
Number of data sets and global attributes in file
Syntax
[ndatasets,ngatts] = fileInfo(sdID)
Description
[ndatasets,ngatts] = fileInfo(sdID)
returns
the number of data sets ndatasets
and the number
of global attributes ngatts
in the file identified
by sdID
.
ndatasets
includes the number of coordinate
variable data sets.
This function corresponds to the SDfileinfo
function
in the HDF library C API.
Examples
import matlab.io.hdf4.* sdID = sd.start('sd.hdf'); [ndatasets,ngatts] = sd.fileInfo(sdID); sd.close(sdID);