LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add an element to a 2-d array?

I have a 2-d array of data sorted into columns. I would like to append an element to one of the columns.
0 Kudos
Message 1 of 6
(2,689 Views)
Use the "Insert Into Array" function under the Array palette. This will allow you to put 1 new element into a 1, 2, or 3 dimensional array at any index (location) you specify.
0 Kudos
Message 2 of 6
(2,685 Views)
This will work as will Build Array as shown in the attached picture. Note that you cannot add just a single element in 1 column. For example, row 5, Column 0 cannot have an empty value when Row 5, Column 1 has something. That is simply an invalid array. When inserting a single numeric element into a row, the default value for the other columns will be 0.
0 Kudos
Message 3 of 6
(2,680 Views)
Thanks for your response. Please see the attached VI to see an example of what I am trying to do.
0 Kudos
Message 4 of 6
(2,676 Views)
To insert into column index 2, the new value should be element 2 of the 1D array.
Message 5 of 6
(2,673 Views)
Carla,

Try this....
0 Kudos
Message 6 of 6
(2,640 Views)