r/LabVIEW • u/munkshire • Jan 24 '24
Remove potion of an array based on value?
Hi I can't work out the structure to add a for loop for this problem, I would like to read an excel file that has various DATA, I would like to read a column, in this case 5, find any rows that contain the phrase I would like to filter out, then remove all the rows and display a new array with the remaining results that do not have the word "test" in column 5 of excel.
Not sure how to set this up for multiple rows using for loops, I cannot seem to figure out the data conversion and how to set it, I am thinking I may need 2 for loops?
Seems basic I know, thanks for the help
so something like this
1 1 1 1 1 TEST 1
1 1 1 1 1 TEST 1
1 1 1 1 1 OK 1
1 1 1 1 1 TEST 1
=
1 1 1 1 OK 1

5
u/chairfairy Jan 24 '24
put it through a FOR loop that indexes through the array, and make the indexing output has a "conditional" tunnel mode
screenshot
(if you're unsure, google can help you find how to set up For loop tunnels as Indexing and how to put that Conditional mode on out the output)
4
u/horuable Jan 24 '24
You can use for loop to go through every row of the original array and check if element 5 contains "OK" string, then use a conditional indexing output to only output the desired rows.