LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

insert into array

Hallo
i`d like to insert into empty 2-d array element, i know indexes of this
element but function "insert into array doesn`t work, how can i do that ?
sorry if lamme
oko



--
Serwis Usenet w portalu Gazeta.pl -> http://www.gazeta.pl/usenet/
0 Kudos
Message 1 of 2
(2,892 Views)
If your array is initially empty, you can use Insert Into Array only to insert row 0 or column 0. You can't use Insert Into Array to insert a new row 5 into an empty array and expect the function to fill in the first five rows.
In a 2D array, you can't use Insert Into Array to insert an individual element: you can only use it to insert a row or a column. You can only wire one one of the index inputs: either row or column, not both.
See the LabView help for Insert Into Array which explains "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."
I
think you should consider two changes:
1. Initialize your array to a known size: don't create an empty array.
2. Use Replace Array Subset (rather than Insert Into Array) if you want to replace an individual element instead of an entire row or column.
Message 2 of 2
(2,892 Views)