Welcome to our Support Center

Index Array

Description

Returns the element or subarray of n-dimensional array at index.

Warning : A new tensor is created for the output.

 

Input parameters

 

Β array : class, n-dimensional tensor.
index : array, specifies a number that refers to a location within the input array. If you leave the index input unwired for a ND array, the Index Array function returns all elements of the array. If the index is equal to -1, this index is used to retrieve an array subnet rather than a single element. For example, to retrieve column 1 from a 2D array, the index must be equal to [-1, 1].

Output parameters

 

subarray : class, n-dimensional tensor indexed.

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install PERRINE library to run it).

Index 1D Array

Index 2D Array

Index 3D Array

Table of Contents
Index