This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Data space size and maximum size


[numdims,h5_dims,h5_maxdims] = H5S.get_simple_extent_dims(space_id)


[numdims,h5_dims,h5_maxdims] = H5S.get_simple_extent_dims(space_id) returns the number of dimensions in the data space, the size of each dimension, and the maximum size of each dimension.

    Note:   The HDF5 library uses C-style ordering for multidimensional arrays, while MATLAB® uses FORTRAN-style ordering. The h5_dims and h5_maxdims assume C-style ordering. Please consult "Using the MATLAB Low-Level HDF5 Functions" in the MATLAB documentation for more information.


fid ='example.h5');
dset_id =,'/g2/dset2.2');
space_id = H5D.get_space(dset_id);
[ndims,h5_dims] = H5S.get_simple_extent_dims(space_id);
matlab_dims = fliplr(h5_dims);
Was this topic helpful?