Main Content
matlab.io.hdf4.sd.setRange
Namespace: matlab.io.hdf4.sd
Set maximum and minimum range value for dataset
Syntax
setRange(sdsID,maxval,minval)
Description
setRange(sdsID,maxval,minval)
sets the maximum and minimum range values
of the dataset identified by sdsID
. These values form the "valid_range"
attribute for sdsID
.
The actual maximum and minimum values of the dataset are not computed. The "valid_range" attribute is for informational purposes only.
This function corresponds to the SDsetrange
function
in the HDF library C interface.
Examples
import matlab.io.hdf4.* sdID = sd.start('myfile.hdf','create'); sdsID = sd.create(sdID,'temperature','double',[10 20]); sd.setDataStrs(sdsID,'Temperature','degrees_celsius','%.2f',''); sd.setRange(sdsID,1000,-273.15); sd.endAccess(sdsID); sd.close(sdID);