Main Content

matlab.io.hdf4.sd.getRange

Namespace: matlab.io.hdf4.sd

Maximum and minimum range values

Syntax

[maxval,minval] = getRange(sdsID)

Description

[maxval,minval] = getRange(sdsID) retrieves the "valid_range" two-element attribute value.

This function corresponds to the SDgetrange function in the HDF library C API.

Examples

import matlab.io.hdf4.*
sdID = sd.start('sd.hdf');
idx = sd.nameToIndex(sdID,'temperature');
sdsID = sd.select(sdID,idx);
[maxval,minval] = sd.getRange(sdsID);
sd.endAccess(sdsID);
sd.close(sdID);

See Also