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.


Specify coordinates to include in selection




H5S.select_elements(space_id,op,h5_coord) selects the array elements to be included in the selection for the data space specified by space_id. The op argument determines how the new selection is to be combined with the previously existing selection for the data space and can be specified as one of the following:


h5_coord is a two-dimensional array of 0-based values specifying the coordinates of the elements being selected. If m is the rank of the data space and if n is the number of points, then h5_coord should be an m-by-n array.

    Note:   The HDF5 library uses C-style ordering for multidimensional arrays, while MATLAB® uses FORTRAN-style ordering. The h5_coord parameter assumes coordinates have C-style ordering. Please consult "Using the MATLAB Low-Level HDF5 Functions" in the MATLAB documentation for more information.


Select the corner points of a data space. In this case, h5_coord should have size 2x4.

dims = [100 200];
h5_dims = fliplr(dims);
space_id = H5S.create_simple(2,h5_dims,h5_dims);
coords = [0 0; 0 199; 99 0; 99 199];
h5_coords = fliplr(coords);
h5_coords = h5_coords';
Was this topic helpful?