LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

search array, find first -1 value then make that current position

hi,
i have an array of serial numbers...
how do i search the array for serial number that is  =  -1
i want to find the first -1 value and make that my current position?

Best regards,
Krispiekream
0 Kudos
Message 1 of 6
(3,080 Views)
sorry, i have 2d array,
how would i do that?




Message Edited by krispiekream on 03-19-2008 01:29 PM
Best regards,
Krispiekream
0 Kudos
Message 3 of 6
(3,075 Views)
There is no "first" for a 2D array unless you decide on an order in which to search dimensions.
 
Easiest would be to reshape the 2D array into a 1D array with a lenght corresponding th the product of the sizes, then use "search 1D array" and calculate the 2D indices from the 1D indices (hint quotient&remainder). 🙂


Message Edited by altenbach on 03-19-2008 11:44 AM
Message 4 of 6
(3,068 Views)
Here's one of my old examples that you can probably modify for your purpose:
 
Message 5 of 6
(3,061 Views)
cool, thanks,
thats why your the best..

Best regards,
Krispiekream
0 Kudos
Message 6 of 6
(3,049 Views)