Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Insert Into Array

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Inserts an element or subarray into n-dim array at the point you specify in index.

When you wire an array to this function, the function resizes automatically to display index inputs for each dimension in the array. If you do not wire any index inputs, the function appends the new element or subarray to the end of the n-dim array.

Details  

n-dim array is the array in which you want to insert an element, row, column, page, and so on. This input can be an n-dimension array of any type.
index 0..n-1 specifies the point in the array at which you want to insert the element, row, column, page, and so on. You can wire only one index input. For example, to insert a 1D array as the fourth row of a 2D array, wire 3 to the first index input, and the second index input becomes disabled. To insert the array as the fourth column of the 2D array, wire 3 to the second index input, and the first index input becomes disabled.
n or n-1 dim array is the element, row, column, or page you want to insert into the array specified in n-dim array.
output array is the array this function returns with the inserted element(s), row(s), column(s), or page(s).

Insert Into Array Details

Note  The base data type of the new element or array must be the same type as the input array.

This function resizes the array along only one dimension. Therefore, you can wire only one index input. The index you wire determines the dimension along which you can insert. For example, to insert row(s), wire the row index, or to insert column(s), wire the column index.

The array you wire to n or n-1 dim array must be the same dimension or a dimension less than the one you wired to n-dim array. For example, you cannot insert a single element into a 2D array, and you cannot insert a single row (a 1D array) into a 3D array. You can, however, insert a 2D array that has a single row into a 3D array. LabVIEW pads the resulting array as necessary.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit