Documentation Center

  • Trial Software
  • Product Updates
我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

H5S.create_simple

Create new simple data space

Syntax

space_id = H5S.create_simple(rank,h5_dims,h5_maxdims)

Description

space_id = H5S.create_simple(rank,h5_dims,h5_maxdims) creates a new simple data space and opens it for access. rank 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. space_id is a data space identifier.

    Note:   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.

Examples

Create a data space for a dataset with 10 rows and 5 columns.

dims = [10 5];
h5_dims = fliplr(dims);
h5_maxdims = h5_dims;
space_id = H5S.create_simple(2,h5_dims,h5_maxdims);
 

Create a data space for a dataset with 10 rows and 5 columns such that the dataset is extendible along the column dimension.

dims = [10 5];
h5_dims = fliplr(dims);
maxdims = [10 H5ML.get_constant_value('H5S_UNLIMITED')];
h5_maxdims = fliplr(maxdims);
space_id = H5S.create_simple(2,h5_dims,h5_maxdims);

See Also

| |

Was this topic helpful?