LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Haw to find element in array which occurs only once

Solved!
Go to solution

I thought it better to search the whole range +/-.  This will make his VI more flexible rather than fixing it to a specific range.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 11 of 14
(421 Views)

I don't know for what elements will I look for. Range 1-9 was just example. All I know about numbers is that they are integers from 0 to 2000 or more.

So I think good way to handle that is to find Max and min value in array and then search and increment by 1

 

0 Kudos
Message 12 of 14
(402 Views)

Were you able to open my .zip file?  This should work per your spec.  The only thing I forgot to include was the position of the element in the array, but with some modifications you should be able to do that.  You did not mention Max/Min in your ealier posts, but Max/Min should not matter, at least it doesn't with my VI.  It will simply return the single instances found in a 2D array.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 13 of 14
(395 Views)

@pawhan11 wrote:

I don't know for what elements will I look for. Range 1-9 was just example. All I know about numbers is that they are integers from 0 to 2000 or more.

So I think good way to handle that is to find Max and min value in array and then search and increment by 1

 


 

How big is the input array going to be? Greater than 2000?

 

It might be better to increment through a 1D copy of the input array check each index to the rest of the array for matches.

Than to check for all possible values (2000+)

 Search 2D array for single occurrence.png

 

Omar
0 Kudos
Message 14 of 14
(391 Views)