LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read array size eliminating blank values

Solved!
Go to solution

I have an array of 2X10 size. In the first column, the elements are 10 and in the second column the elements are only 6. If I use array size and index the size of second column, the value given out is 10 which is supposed to be 6. I noticed that it is creating blank or null values in the column for the remaining four. How do I eliminate the blank values and only get the actual sze of the column?

Labview Learner
0 Kudos
Message 1 of 3
(2,863 Views)
Solution
Accepted by topic author Ashaironix

Index the colum and use Search 1D Array for an empty string.  The result should be the number of non-empty strings.  If the result is -1, use the actual array size.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 3
(2,859 Views)

2D arrays are rectangular. All rows need to be the same size and all columns need to be the same size.

 

"blank" (=empty string" is only defined for string, but you seem to deal with numerics. (it is not entirely clear if you talk about the element values or the sizes).

 

If you want ragged arrays, use a 1D array where each element is a cluster containing a 1D array.

Message 3 of 3
(2,856 Views)