11-04-2016 02:52 AM
Hello,
does anyone know, how I can detect the position (row, column) of the non "NaN" elements in this 2D array?
I can "clean" the array to get only non "NaN" elements in a 1d array. But I cannot detect their position in the array. I need the row position (position of Y axis value in a plot), because i have to find the corresponding x-value and use it for a signal processing item.
I hope it is not very difficult to make this and that someone could help me.
thanks
Solved! Go to Solution.
11-04-2016 03:27 AM
Hi Sarah,
as you work with a 2D array you need two nested FOR loops to autoindex each element. In the inner FOR loop you use the "Not a Number?" function to check the current element. If it is a number you store it's indexes (the loop iterator outputs!) in an output array using conditional output tunnels…
This is basic LabVIEW stuff you already should have learned by the experience you gained from visiting the LabVIEW forum!
11-04-2016 06:03 AM - edited 11-04-2016 06:03 AM
Here is one that uses OpenG Array toolkit. The search array can be coded up easily too.
11-07-2016 02:24 AM
Thanks guys!
11-07-2016 04:31 AM
11-07-2016 05:19 AM - edited 11-07-2016 05:23 AM
The picture is a snippet. You should be able to drag that to your block diagram directly. if that does not work, save the picture to your PC and then drag it in.
OpenG toolkit can be downloaded using VI Package Manager (ships with LabVIEW 2014 DVDs) or may be downloaded here: http://vipm.jki.net/download
11-07-2016 05:28 AM
got it.. thank you very much!