This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this 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.


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);