LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Find all values in an array?

I have an array and I want to output ALL the index values that correspond to a particular value.  The Search 1D array only returns the first index, is there a VI that returns them all?  Thanks.
0 Kudos
Message 1 of 3
(4,564 Views)
You can easily write one. Put the Search 1D Array function inside a loop. Pass the index of element via a shift register to the start index input for the next search.

Be aware of the issues associated with comrarisons of non-integer data types. Search 1D Array only finds exact matches.

Lynn
Message 2 of 3
(4,558 Views)
For some easy reading, check out the following old thread:
 
 
🙂
 
(If you have 8 or higher, you could even use a mathscript one-liner ;))
0 Kudos
Message 3 of 3
(4,538 Views)