02-19-2015 04:19 AM
Hi,
I need a way to compare 5 elements with eachother.
When one or more elements are the same it needs to give me a boolean output.
But the compare has to exclude 0.
In the attached VI the elements I need to compare are the Identifiers.
I warn you my VI is verry messy.
I've tried allot of things, but can't seem to figure something out.
hoping for a quick answer
Lore Maris
Student
KDG Antwerp
Belgium
02-19-2015 07:18 AM
Ok, let's simplify things to just your exact problem. There is just too much noise in that VI to figure out where your problem is.
So create a very simple VI that shows what your inputs are and the desired output. Be sure to save the example data as the default values.
At the top of my head, I think you are going to need a FOR for to autoindex the array and use Search 1D Array inside of the FOR loop to look for duplicates.
02-19-2015 08:42 AM
How about sort 1-D array. Use Array Subset to get two arrays starting from 0 and starting from element 1. Compare them for equality element by element. OR array elements. If there are any duplicates, they'd wind up next to each other after sorting, and you'd get a True somwhere along the array when comparing side by side elements.