Main Content

matlab.io.hdf4.sd.endAccess

Namespace: matlab.io.hdf4.sd

Terminate access to dataset

Syntax

sd.endAccess(sdsID)

Description

sd.endAccess(sdsID) terminates access to the dataset identified by sdsID. Failing to call this function after all operations on the specified dataset are complete may result in loss of data.

This function corresponds to the SDendaccess 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);
sd.endAccess(sdsID);
sd.close(sdID);