LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Check Array have only Identical Elements

Solved!
Go to solution

Hi,

 

 

Try to write a program in LabVIEW ,that check if an array have only Identical values in its indexes ,but couldnt find any good solution.

 

Please do suggest how to do this.

 

Attached the String array constant contain array of undentical elements and Identical elements.

0 Kudos
Message 1 of 13
(7,877 Views)

use compare function

 

Compare array.png

With Regards

Miraz
Kudos is better option to thank somebody on this forum
------------------------------------------------------------------------------
0 Kudos
Message 2 of 13
(7,846 Views)

Hi Miraz,

 

To be clear from my side,If an array have 5 elements and all the 5 elements should be identical to themselves this is what i need to check.

 

My picture might be confused you.

 

Please do suggest on this.

0 Kudos
Message 3 of 13
(7,829 Views)
Solution
Accepted by Dskp

Hello Selvan,

 

I think you are looking for this kind of solution, please see below image.

 

Kudos are always Welcome.... 🙂

 

Search Identical.png

Vinal Gandhi, CLA
Message 4 of 13
(7,817 Views)

HI Vinal,

 

 

Great !!!Smiley Happy

 

Expected the same.

 

 

Thanks,

 

Selvan

0 Kudos
Message 5 of 13
(7,758 Views)

You can minimize the number of possible iteration by a factor of n (the array size) if you use the Rotate 1D Array function.

 

Ben64

 

compare 1D elements.png

Message 6 of 13
(7,732 Views)

Hi Ben.

 

This too working fine.

 

Thanks for your work.

 

Thanks,

 

Selvan

0 Kudos
Message 7 of 13
(7,698 Views)

@SELVAN.skp wrote:

 

Try to write a program in LabVIEW ,that check if an array have only Identical values in its indexes ,but couldnt find any good solution.

 

Please do suggest how to do this.

 

Attached the String array constant contain array of undentical elements and Identical elements.

 


 

 

Your example does not show arrays with only identical elements. Your left array has one or more duplicate elements. Is that what you are looking for? It seems you want to check if all elelents are unique or not, right?

0 Kudos
Message 8 of 13
(7,680 Views)

 Hi,

 

you are right.

 

to be simple,need check if an array have  unique values.

 

Please dont confuse with the image,it just for an example something for reference.

 

Thanks,

 

Selvan

0 Kudos
Message 9 of 13
(7,656 Views)

Check if all elements are equal:

CheckArray.png

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 10 of 13
(7,576 Views)