Main Content

matlab.io.hdf4.sd.endAccess

Package: matlab.io.hdf4.sd

Terminate access to data set

Syntax

sd.endAccess(sdsID)

Description

sd.endAccess(sdsID) terminates access to the data set identified by sdsID. Failing to call this function after all operations on the specified data set 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);