LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare two string 2D arrays

Solved!
Go to solution

Hi,

 

I would like to get the indexes of the different elements between two string arrays. I can do it element by element but it seems stupid. Perhaps there is a simpler way that can do the job? Does anyone have ideas?

 

Thanks in advance.

 

Best Regards,

K

 

 

0 Kudos
Message 1 of 5
(3,442 Views)

Go row by row and compare the 1-D arrays.  If they are different then look for the Falses in that 1-D array.

0 Kudos
Message 2 of 5
(3,421 Views)
Solution
Accepted by topic author KwanSHL

Hi,

 

try this:

check.png

(Hint: Conditional and concatenating output tunnels…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(3,399 Views)

Thanks guys, this will do the trick!

0 Kudos
Message 4 of 5
(3,393 Views)

(The above assumes that the two arrays are identical in size and that equal entries need to be binary identical. Depending on where these strings come from, you might want to do a case insensitive match and/or ignore leading and trailing whitespace if present.)

0 Kudos
Message 5 of 5
(3,385 Views)