Main Content

matlab.io.hdf4.sd.getChunkInfo

Namespace: matlab.io.hdf4.sd

Chunk size for dataset

Syntax

chunkDims = getChunkInfo(sdsID)

Description

chunkDims = getChunkInfo(sdsID) returns the chunk size for the dataset specified by sdsID. If a dataset is chunked, the dimensions of the chunks is returned in chunkDims. Otherwise chunkDims is [].

This function corresponds to the SDgetchunkinfo function in the HDF library C API, but because MATLAB® uses FORTRAN-style ordering, the chunkDims 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);
cdims = sd.getChunkInfo(sdsID);
sd.endAccess(sdsID);
sd.close(sdID);