From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare set values 1D-Array

Solved!
Go to solution

I have checked but I can't find spaces but I noticed that the first string corresponding to the number 1 is not read.

0 Kudos
Message 11 of 14
(302 Views)
Solution
Accepted by topic author frank22

Because you posted the actual VI, I could see the problem was with the case that was not visible in your picture.

 

In your other case you gave it a value of 1.  It should be -1.

The first case could be just Default rather than "0, Default".

 

If you do a less than zero comparison, you can turn that case structure into True and False since it will be a Boolean value coming out of the comparison.

0 Kudos
Message 12 of 14
(284 Views)

I had made that mistake. Now it works well. Thanks for everything

0 Kudos
Message 13 of 14
(263 Views)

Of course if the arrays are very big, the current solution becomes very inefficient.

 

Better solutions could be implemented by e.g. sorting the two input arrays and adjusting the search start index as you go along. Of course variant attributes come to mind too (and if you would upgrade to LabVIEW 2019, a solution based on a "set" would work great ;))

0 Kudos
Message 14 of 14
(247 Views)