matlab.io.hdf4.sd.setDataStrs
Namespace: matlab.io.hdf4.sd
Set predefined attributes for dataset
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 dataset.
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);