LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing multiple elements within a 2D array

Solved!
Go to solution

Hi, I have a doubt that how can we compare each element in 2D array with the other elements in the same array. I tried some methods. But those didn't work. I have attached an image of the 2D array. I just want to know the logic. 

 

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 1 of 8
(3,561 Views)

Compare how?  That they are different?  They are outside of a given range?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(3,556 Views)

Hi, Sorry to say that. Here I need a comparison of elements with the same values. If any one of the elements in the 2D array has same value or equal to the other elements in the same array I need to save that status as boolean array.

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 3 of 8
(3,542 Views)
Solution
Accepted by topic author dhans

I am not sure I understand your requirement fully as yet. Try this one:

duplicates.png


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 4 of 8
(3,488 Views)

Hi,

Thanks for the reply. Can you attach the output and False 'case' of the case structure snippets?

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 5 of 8
(3,463 Views)

Hi, 

Yes. This is the one I was seeking for. But I have one more doubt. In the attached image I have marked an area. In what situation logic inside that area is useful? With out that 'greater than' logic, I can get an output required. So whats the reason behind that comparison logic?

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 6 of 8
(3,454 Views)

The Less Than is not really needed.  You can use a TRUE constant.  But the second Replace Array Subset is needed due to set the current element TRUE.  The first one sets the match's element to TRUE.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 8
(3,421 Views)

Hi Crossrulz,

Thanks. 

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 8 of 8
(3,405 Views)