Main Content

matlab.io.hdf4.sd.close

Namespace: matlab.io.hdf4.sd

Terminate access to SD interface

Syntax

sd.close(sdID)

Description

sd.close(sdID) closes the file identified by sdID.

This function corresponds to the SDend function in the HDF C API.

Examples

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

See Also