LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

search for id matrix

Hi,

 

How do you search for particular id in matrix and display all record having that particular ID

 

Thanks

0 Kudos
Message 1 of 2
(2,146 Views)

Hello,

 

You need to compare each element from the matrix with the searching element - and if they are the same I add the number of row and column to an another array, where you are saving the locations of found elements.

 

Here is example code of searching for elements:

 

search.png

 

Be aware that when you auto-index the matrix (square at the end of the wire which come from matrix) the program automatically converts matrix into an array - if you want to output matrix out of auto-indexing for-loop, you need to transfer into matrix with function called Array into Matrix.

 

Please let me know if this solution is the one you were looking for.

 

Best Regards,

Gregor Cerne

0 Kudos
Message 2 of 2
(2,122 Views)