Main Content

matlab.io.hdf4.sd.setCal

Namespace: matlab.io.hdf4.sd

Set dataset calibration information

Syntax

setCal(sdsID,cal,calErr,offset,offsetErr,datatype)

Description

setCal(sdsID,cal,calErr,offset,offsetErr,datatype) sets the calibration information for a dataset.

This function corresponds to the SDsetcal 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,'Temperature','degrees_kelvin','%.3f','spherical');
sd.setCal(sdsID,1,0,273,0,'double');
sd.endAccess(sdsID);
sd.close(sdID);

See Also