Documentation

This is machine translation

Translated by Microsoft
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.

getelements

Get neural network data elements

Syntax

getelements(x,ind)

Description

getelements(x,ind) returns the elements of neural network data x indicated by the indices ind. The neural network data may be in matrix or cell array form.

If x is a matrix, the result is the ind rows of x.

If x is a cell array, the result is a cell array with as many columns as x, whose elements (1,i) are matrices containing the ind rows of [x{:,i}].

Examples

This code gets elements 1 and 3 from matrix data:

x = [1 2 3; 4 7 4]
y = getelements(x,[1 3])

This code gets elements 1 and 3 from cell array data:

x = {[1:3; 4:6] [7:9; 10:12]; [13:15] [16:18]}
y = getelements(x,[1 3])

Introduced in R2010b

Was this topic helpful?