matlab.io.hdf4.sd.readChunk
Package: matlab.io.hdf4.sd
Read chunk from data set
Syntax
datachunk = readChunk(sdsID,origin)
Description
datachunk = readChunk(sdsID,origin)
reads
an entire chunk of data from the data set identified by sdsID
.
The origin
input specifies the location of the
chunk in zero-based chunking coordinates, not in data set coordinates.
This function corresponds to the SDreadchunk
function
in the HDF library C API, but because MATLAB® uses FORTRAN-style
ordering, the origin parameter is reversed with respect to the C library
API.
Examples
import matlab.io.hdf4.* sdID = sd.start('sd.hdf'); idx = sd.nameToIndex(sdID,'temperature'); sdsID = sd.select(sdID,idx); dataChunk = sd.readChunk(sdsID,[0 1]); sd.endAccess(sdsID); sd.close(sdID);