# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Comparing multiple elements within a 2D array

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) 😉
Message 1 of 8
(3,541 Views)

## Re: Comparing multiple elements within a 2D array

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

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
Message 2 of 8
(3,536 Views)

## Re: Comparing multiple elements within a 2D array

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) 😉
Message 3 of 8
(3,522 Views)
Solution
Accepted by topic author dhans

## Re: Comparing multiple elements within a 2D array

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

Subscribe to the Test Automation user group: UK Test Automation Group
Message 4 of 8
(3,468 Views)

## Re: Comparing multiple elements within a 2D array

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) 😉
Message 5 of 8
(3,443 Views)

## Re: Comparing multiple elements within a 2D array

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) 😉
Message 6 of 8
(3,434 Views)

## Re: Comparing multiple elements within a 2D array

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.

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
Message 7 of 8
(3,401 Views)

## Re: Comparing multiple elements within a 2D array

Hi Crossrulz,

Thanks.

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