LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compare value between two array

hi...

I need help here please...I have two 2D arrays which is arrayA and arrayB. I want to compare the data that stored in both arrays and delete the same data in arrayB. The example data that stored in arrayA as in the db8.txt and arrayB as error.txt. please help me...I also attached my program.


thanks...
Download All
0 Kudos
Message 1 of 6
(3,482 Views)

Hi gdah,

which column do you want to compare? Why do you work with dbl numbers?

Mike

0 Kudos
Message 2 of 6
(3,475 Views)
Hi gdah,
             Could you post the code for lv 8.0?
0 Kudos
Message 3 of 6
(3,466 Views)
hi rpr..
sorry..i dont know how to make the vi for lv 8.0..can u teach me??
0 Kudos
Message 4 of 6
(3,436 Views)
hi..
i want to compare both column..if values in column 1&2 in arrayB match with column 1&2 in arrayA, so delete the values in arrayB
0 Kudos
Message 5 of 6
(3,434 Views)
Well, you don't have 2D arrays, just two files. If you want to compare entire lines, you can work on 1D arrays, one line/element.
 
Here's a quick attempt, see if it can give you some ideas. I use strings as inputs and outputs. You can easily change it so it read and writes your text files instead.
 
Many things could be improved if we had more information. For example do you know if the lines are always sorted?
 
(I have absolutely no idea what you were trying to do your VI and why you even attached it. It makes no sense at all and contains way too much code for such a simple task. It is also extremely inefficient because you constantly resize arrays).
0 Kudos
Message 6 of 6
(3,415 Views)