LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete unwanted rows from 5x3 array

I want to go through a 5x3 array and delete all rows beginning with 3 or 7 (index =0). The result is a new array without the last mentioned rows.

0 Kudos
Message 1 of 3
(2,365 Views)

Hi erica,

 

ok - and where's the problem?

Do you want us to produce ready-to-use code for you?

 

You could also try this on your own:

- Use IndexArray to get the first column.

- Use an autoindexing FOR loop to iterate over the full array and the first column

- If first-column value is not 3 or 7 then add row of full array to output array

 

You could also search the forum for topics like "filter array", such questions arise very often...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,325 Views)

Hi,

 

I would connect it to a for loop with auto-index on.

In each loop, check if the first index is equal to 3 or 7 (whatever you want).

If yes, delete the row, if not, keep going~~

0 Kudos
Message 3 of 3
(2,295 Views)