LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

parse 1d array into 2d array

I have a 1d array of data with a true false case statement, I want to push the data into a 2d array.  The data is split up between frames, the data used as frames are false and the rest true, when I get a sequence of true data I want it to have its own column in the 2d array, and to increment to the next column when I get a sequence of false statements. So far I have only been able to parse out the frames, and push all the viable data into a single array with no way to separate the the streams in which they come in.  If anyone can help me with this I would greatly appriciate it.
0 Kudos
Message 1 of 5
(2,627 Views)
You will need to provide some sample data and what the end result should be for that sample data, since we don't know what you mean by "frames" (everyone has their own definition), and what "true data" means for you (is this when a value is equal to something, greater than something, less than something).
0 Kudos
Message 2 of 5
(2,625 Views)
Sorry about being to vauge, here is some exaple data, it contains an array a numbers, the digit 126 acts as my frame and is used the case as my false.  The array produced contains all the data in array1 minus the 126's.  I hope this clarifies.
0 Kudos
Message 3 of 5
(2,619 Views)
No, this does not clarify anything.
 
Where does the 2D array come in? Whay is the size of it?
 
Enter some real data in the controls and make the values default.
 
Please give an example with typical input and the desired 2D array output.
0 Kudos
Message 4 of 5
(2,604 Views)
Unfortunately, when you saved the VI you did not set the array control to "Make Current Value Default" so the data would be saved, so there was no data. I see what you're doing though. The resulting 1D array just needs to be fed to another Reshape Array function to turn it into a 2D array. The following is one way to do it:


Note that this assumes your frame size is the same. Is it?


Message Edited by smercurio_fc on 05-28-2008 03:54 PM
0 Kudos
Message 5 of 5
(2,602 Views)