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.


Set size of data space




H5S.set_extent_simple(space_id,rank,h5_dims,h5_maxdims) sets the size of the data space identified by space_id. The rank argument is the number of dimensions used in the data space. h5_dims is an array specifying the size of each dimension of the dataset. h5_maxdims is an array specifying the upper limit on the 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 parameters assume C-style ordering. Please consult "Using the MATLAB Low-Level HDF5 Functions" in the MATLAB documentation for more information.


space_id = H5S.create('H5S_SIMPLE');
dims = [100 200];
h5_dims = fliplr(dims);
maxdims = [100 H5ML.get_constant_value('H5S_UNLIMITED')];
h5_maxdims = fliplr(maxdims);
H5S.set_extent_simple(space_id,2,h5_dims, h5_maxdims);