ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem on 1D array in while loop

Solved!
Go to solution

Hi everyone,

 

I searched for this problem in the forum but seems no posts quite answered it.  

I got stuck by recording data in a while loop. 

I have a while loop, inside which there is two outputs in each iteration I want to add to an array, then after the while loop is finished, I want to combine these two arrays into a 2D array (since the output of them should be a pair in my case).

 

I tried 'Build array' and 'transpose array' ,and 'write to spreadsheet' element together, what keeps bothering me is how to just append the output to a 1D array during each iteration, these 2 ouputs are in numeric format, which prevent to to directly create an array for it.

 

Any idea is well appreciated,

 

Thanks,

 

Kunsheng Chen

0 Kudos
Message 1 of 4
(5,354 Views)

I think I understand what you're asking.  Each Numeric represents the outputs you mentioned; the tunnels will collect each output and build a 1D array of each.   The build array makes them into a 2D array.

 

Anybody want a peanut? 

 

Jim

 

Message Edited by jcarmody on 02-13-2009 04:20 PM
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 4
(5,347 Views)
Solution
Accepted by Kunsheng Chen

Heres some other ways to insert.

Hope it helps

Download All
0 Kudos
Message 3 of 4
(5,308 Views)
Thanks a lot. It really helps!
0 Kudos
Message 4 of 4
(5,248 Views)