LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to compare array of different sizes

hi,
 
I have 2 elements in one array ( Input array ) and i need to check this elements with an array (comparison array )consisting of 3 elements.
If the input array is present in the comparison array , i need to get the third element corresponding to the input array.
 
I have attached an example which explains my situation.
 
Is there anybody to help me out???????
 
Thanks in advance.
 
Radhika.
0 Kudos
Message 1 of 2
(2,366 Views)
Is the order of the data significant? Looking at your "comparison array" there seems to be some order to it. Thus, you could search the first column for "Input 1" and then the second column for "Input 2" starting at the row where you found "Input 1". Something like what's shown in the first image. (Your VI indicates you have LabVIEW 7 so I had to make pictures.)



Otherwise, you need a little more. In your example you need to create a full 2D array that's the same number of rows as "Comparison Array". Once you do that you can something like what's show in the second attached image.


Message Edited by smercurio_fc on 03-30-2007 05:14 PM

Download All
0 Kudos
Message 2 of 2
(2,348 Views)