02-19-2013 01:55 PM
Hello,
I have a 2d array whose 16 columns contain data from different input chanels. I also have a 1d boolean array (length 16) corresponding to those columns. In the 1d boolean array, if a value is true, I want that column in the 2d array to remain. If the value in the 1d boolean array is false, I want to delete the corresponding column.
Thus, for example, if the 1d boolean array looks like this:
[T T T T F F T T T F T T F F T F]
than the new 2d array would have 10 columns, corresponding to the old 16-column array's columns 1, 2, 3,4, 7, 8, 9, 11, 12, and 15.
I am very new to labview (just started programming yesterday). Can someone help a newbie do something which is probably simple? I think it will involve iterating backwards across the columns of the 16-column array and deleting rows as they come if the boolean vector's value is false, or iterating forwards through the 16-column array and adding columns to a new array if the boolean vector's value is true... but I don't know how to do this.
thanks,
Matt
Solved! Go to Solution.
02-20-2013 01:30 PM
If you have 2012 you could just do this:
--Ryan S.
02-20-2013 03:07 PM
Thanks Ryan. How do I do the []/? thing on the right side of the for-loop?
Matt
02-20-2013 03:37 PM
I figured that out - I right-clicked on the brackets [] and selected a conditional type tunnel.
thanks!
Matt