03-05-2009 08:47 PM
Hello,
Can you help me to compare the two arrays in the attached VI file and output the elements that are common to the two arrays?
Thanks,
hiNi
Solved! Go to Solution.
03-05-2009 09:17 PM - edited 03-05-2009 09:19 PM
Maybe something like this?
If your arrays are large, there are probably much more efficient ways. 😉
03-06-2009 12:03 AM
Hello,
I seem to only get the last element in the 'sames' array. Is there a way to get all the same elements in the output array?
THANK YOU for your help!!!
hiNi
03-06-2009 12:11 AM
Hai,
I gave some test values to the vi and the logic works fine. I get all the similar elemants in the output array. What is the exact problem you are facing.
Post with screen shots.
03-06-2009 05:20 AM - edited 03-06-2009 05:25 AM
I've got OpenG array functions on the brain this morning, and a touch of Rube-Goldberg, so here's how I did it. Add the array elements, delete the duplicates saving the array of indices to use when deleting the duplicates from the original (concatenated) array. Use the deleted element output and Bob's your uncle, too.
03-06-2009 10:43 AM
This is the problem I get. I don't get all the elements in the final array.
Thanks,
hiNi.
03-06-2009 11:55 AM - edited 03-06-2009 11:57 AM
You didn't wire the array through the False state in your Case structure. Use default if unwired is selected for that tunnel; the default for that tunnel is an empty string array. Run the wire straight through and Bob is your father's brother.
03-06-2009 12:06 PM
Are those functions on your VI only availabe on LabView 9? I am running labview 8.2 and don't see those blocks.
Thanks,
hiNi.
03-06-2009 12:07 PM
03-06-2009 12:08 PM - edited 03-06-2009 12:10 PM
hiNI wrote:Are those functions on your VI only availabe on LabView 9? I am running labview 8.2 and don't see those blocks.
Thanks,
hiNi.
I would surely hope not! LabVIEW 9 isnt even out yet. And if it is, why was I not informed?
What 'blocks' are you referring to?
And can you please mark the post that answered the original question as the solution rather than your own.