Showing results for 
Search instead for 
Did you mean: 

How to remove elements of an array based on this index A+i*B order

Let's say I have 36 elements in my array and I would like to delete elements 10,11 and also 10+i*12 and 11+i*12

I mean for example  10,11,22,23, 34 and 35  when i starts from 0 to 3

What is the simplest way to implement this


0 Kudos
Message 1 of 3

You'll need a For Loop.  You'll need a shift register to maintain the array between iterations as you proceed to delete each element.


I'd recommend deleting the last elements first because if you delete an earlier element, all of the index values of the later elements will shift forward by 1.

0 Kudos
Message 2 of 3

This code actually conditionally (re)builds the resulting array rather than deleting elements, which provides the same effect.


Remove Array Elements.png

Feel free. Contact me for anything more,

You too can be LabVIEW Awesome!
0 Kudos
Message 3 of 3