matlab.io.hdf4.sd.setDataStrs
Package: matlab.io.hdf4.sd
Set predefined attributes for data set
Syntax
setDataStrs(sdsID,label,unit,format,coordsys)
Description
setDataStrs(sdsID,label,unit,format,coordsys)
sets
the predefined attributes 'long_name'
, 'units'
, 'format'
,
and 'coordsys'
for a data set.
This function corresponds to the SDsetdatastrs
function
in the HDF library C API.
Examples
import matlab.io.hdf4.* sdID = sd.start('myfile.hdf','create'); sdsID = sd.create(sdID,'temperature','double',[10 20]); sd.setDataStrs(sdsID,'degrees_celsius','degrees_east','','geo'); sd.endAccess(sdsID); sd.close(sdID);