05-02-2010 05:41 AM
Hi,
I have an array of 24 rows and 24 column giving me a total of 576 elements. How do I get the row and column of a particular element in an array in LabView. E.g. If I have to write to element 127 how do I get the column and row in which element 127 is located.
Regards,
Harshil
Solved! Go to Solution.
05-02-2010 05:52 AM - edited 05-02-2010 05:53 AM
Hi Harshil,
you can use the "search 1D Array" function inside a for loop. Connect your 2D array to the loop and then to the search function. If the search result is not equal to -1 then you have found a result. The result of the search function gives you the column and the "i" connector of the for loop the row.
Another option would be to first reshape your 2D array to 1d and search inside of it. If you have the result, you can recalculate it to column and row.
Mike
05-02-2010 11:53 AM
05-02-2010 12:21 PM
05-02-2010 12:44 PM