LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compare 2 listboxes with different sizes

Hi,

I need to compare 2 listboxes A and B which have different sizes.
The rules of comparison are: if an element in A is found in B then i should keep this element in A.
                                                    if an element in A is not found in B then i should erase the element from A.

The result of the comparison is a listbox that should replace the listbox A.

The problem is that the listboxes sizes are different. Could u help me ?
Samer,
0 Kudos
Message 1 of 5
(2,721 Views)
Certainly not the most elegant way...but it works !

I substituted listbox with array - but the idea is the same. Does it fit your need ?
0 Kudos
Message 2 of 5
(2,704 Views)

Hi Samer,

use a for loop. Connect the elements from listbox A with autoindexing to the loop and the elements from B without autoindexing. Search for the A elements in B, use the "search 1d array.vi" for it.

Mike

0 Kudos
Message 3 of 5
(2,702 Views)
I'm sure I could do away with the build array function :-S



Hah, you both beat me to it


Message Edited by yenknip on 07-30-2008 11:38 AM
_____________________________
- Cheers, Ed
0 Kudos
Message 4 of 5
(2,693 Views)

hi

اريد الحصول على نفس المثال

 

0 Kudos
Message 5 of 5
(2,334 Views)