LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

remove empy strings in 2D string array

Hello,

      I have this file I am trying to parse. It has alot of info  header in it but I want only the data in it. the data is spaced out from the header by two empty lines. When I process it, I get a lot of empty strings in my array that I want to remove. Run my Vi and see what I am taling about.

I attached the file and vi as well. 

Download All
0 Kudos
Message 1 of 4
(3,201 Views)

You're going to need to iterate through each row to see if it's one you want to keep or not. Like this:

NOAAdataparsing.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 4
(3,177 Views)

Ok, thanks for the reply.

I did get to that final point in your last array. but I guess I do want the header of that array to align. for example, Pred should be moved back to the empty string position and I wasnt able to do that. In other words, there shoudl not be an empty string between Time and Pred

0 Kudos
Message 3 of 4
(3,160 Views)
You could search each row for empty elements and remove them manually there if you'd like. If you haven't already installed it, you should get the OpenG add-on. It has some very helpful array tools. It has a VI that searches an array and outputs all indices found. You could then use those indices to remove the elements that you don't want.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 4
(3,150 Views)