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.


Create copy of data space


output = H5S.copy(space_id)


output = H5S.copy(space_id) creates a new data space, which is an exact copy of the dataspace identified by space_id. The output argument is a data space identifier.


fid ='example.h5');
dset_id =,'/g2/dset2.1');
space1_id = H5D.get_space(dset_id);
space2_id = H5S.copy(space1_id);
[~,dims1] = H5S.get_simple_extent_dims(space1_id)
[~,dims2] = H5S.get_simple_extent_dims(space2_id)