Index Array function
Object information | |
---|---|
Owning palette(s) | Array palette |
Type | Function |
Requires | Basic Development Environment |
Icon |
The Index Array function returns a single element or subarray at a specific index from an array of any type.
Usage
Connect an array to the input terminal n-dimension array to get the first element or subarray (index 0).
Change the number of indices at the node by dragging the upper or lower side. This will cause the node to return the second, third, ... element or subarray (index 1, 2, ...).
Specify an index at the index input terminal to start at a specific element from the array. The input terminals following after that are automatically incremented.
For multidimensional arrays, the number of terminals for each element or subarray matches the number of dimensions of the source array.
The index terminals for multidimensional arrays are sorted in descending order, with the top terminal for the highest dimension. The first four dimensions are given names. From the fifth dimension onward, terminal names increment with the pattern "dim<n>", where "<n>" is the dimension number.
Dimensions | Index terminals |
---|---|
1 | index |
2 | row, col |
3 | page, row, col |
4 | vol, page, row, col |
5 | dim5, vol, page, row, col |
Best practice
- Do not specify an index for the first element or subarray (index 0).
- Use a single Index Array node to get multiple elements or subarrays from the same array in one VI.