LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert item at array index using a for loop

Solved!
Go to solution

Hi all, 

 

I can't seem to figure out the tunnelling - if that is the issue - to insert items at a given index in an array.

I've attached my example, where I initialise an array of all 0s and add some arbitrary elements at some points. The output is a different array for each element I wanted to insert. I just wanted to add them all to the same array.

 

Does anyone know how to do this? Any help would be greatly appreciated.

Thanks

0 Kudos
Message 1 of 2
(146 Views)
Solution
Accepted by labViewComp

Your initialized array needs to be in a shift register.

You should also use "replace array subset" instead of "insert into array". (Insert will add a new element, shifting all upper elements up and growing the array in size)

0 Kudos
Message 2 of 2
(123 Views)