From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I have a matrix N x M which contains a large number of zero. I wish to find the position of the element not equal to zero and to classify them in a table of two columns: line of the matrix and the column of the matrix. I do not need the value of the element.
Matrix data type in LabVIEW is similar as an Array data type, you can use nested For loops to extract individual elements of the matrix and then just check if it is a non-zero element and if so store the iteration ('i' terminal) of both the loops... that will give you the row ('i' terminal of outer loop) and column ('i' terminal of inner loop) index of each non-zero element.
If you are using LabVIEW 2012, it can be a bit more easier. I have used round to nearest integer as there are caveats in comparing floating point numbers.