# Documentation

### This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# H5S.select_elements

Specify coordinates to include in selection

## Syntax

```H5S.select_elements(space_id,op,h5_coord) ```

## Description

`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:

 `'H5S_SELECT_SET'` `'H5S_SELECT_APPEND'` `'H5S_SELECT_PREPEND'`

`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.

## Examples

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'; H5S.select_elements(space_id,'H5S_SELECT_SET',h5_coords); ```

## See Also

Was this topic helpful?

#### Beyond Excel: The Manager's Guide to Solving the Big Data Conundrum

Download white paper