LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting row of zero in one dim array

In my application, I am using the first column of the table as a selection from the combo box. The table is converted to one dimension array of 200 rows and 1 column, Some of the rows have zero value which is visible in the combo box selection , I need to remove the rows containig zero before linking to combo pbox can it be possible

With regards

anusree
0 Kudos
Message 1 of 4
(2,504 Views)
The simplest way is to build a for loop with a case structure that examines each element. If the element is not zero, it adds it to an array being built using Build Array or Insert into Array and a shift register. If it is zero, it is not put into the array.

___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(2,499 Views)
Thank you,

I tried the way but as i am new using for loop My applicaton does not worked as required
0 Kudos
Message 3 of 4
(2,480 Views)
Hi,

Please find attached the VI doing what tst has explained 🙂

The For-loop indexes each element from the Input Array, Insert the element into the new array if it is a non-zero.
If it is a zero, simply shift the array without any insertion.

Cheers!
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 4 of 4
(2,476 Views)