Replace Array Subset
- Updated2023-02-17
- 3 minute(s) read
Replace Array Subset
Replaces an element or subarray in an array at the index you specify.

Inputs/Outputs

array
The array in which you want to replace elements, rows, columns, or pages. This input is an n-dimension array of any type.
Data Type Changes on FPGA
When you add this node to a document targeted to an FPGA, this input has a default data type that uses fewer hardware resources at compile time.

index
Location within array of the element, row, column, or page you want to replace.
Default value: 0
Relationship between index Inputs and array Dimensions
For multidimensional arrays, index inputs correspond to row-major order. Thus, the first index corresponds last dimension of the array input, and the last index corresponds to the first dimension of the array input. The following table shows the relationship between four index inputs and the dimensions of a 4D array input.
index Order | Corresponding Dimension in array Input | index Name |
---|---|---|
1 | 4th | volume index |
2 | 3rd | page index |
3 | 2nd | row index |
4 | 1st | column index |

waveform
The waveform whose array of y values you want to use in this operation. This input becomes available when you wire a waveform to array.

new element/subarray
The element or array that replaces an element, row, column, or page in the array specified in array.
This input changes to new element/waveform subset when you wire a waveform to array.

new element/waveform subset
The element or waveform subset that replaces an element in the array of y values in the waveform specified in waveform.
This input becomes available when you wire a waveform to array.
Data Type Changes on FPGA
When you add this node to a document targeted to an FPGA, this input has a default data type that uses fewer hardware resources at compile time.

output array
The array this node returns with the replaced elements, rows, columns, or pages. This output changes to output waveform when the input data type is a waveform.
Data Type Changes on FPGA
When you add this node to a document targeted to an FPGA, this output has a default data type that uses fewer hardware resources at compile time.

output waveform
The waveform this node returns with the replaced elements. This output becomes available only when the input data type is a waveform.
Replacing Multiple Elements or Array Subsets
Resize this node to replace multiple elements or array subsets at one time.
Behavior for Oversized Subarrays
This node crops any subarray that is too large to fit as a column, row, or page in the input array.
Behavior for Non-Matching Index Values
If any index is negative or larger than the corresponding dimension in array, the node has no effect.