LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I reformat my array?

I am trying to put two inputs into a 2D array.

 

I have figured out how to designate input #1 into row 1 and input #2 into row 2 while the number of columns grow as the samples increase but this isn't exactly what I'm trying to do.

 

I would like input #1 to be in column 1 and I would like input #2 to be in column 2. As the number of samples increases for the inputs I would like the rows to extend down.

 

What I am ultimately trying to do is export the array to a software such as excel or matlab so I can graph the results from there. 

 

Here are images of how far I have gotten;

array stuff.PNG

arraystuff front panel.PNG

 

Thanks

0 Kudos
Message 1 of 4
(2,562 Views)

Hi bela,

 

ever heard about that TransposeArray function? 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,560 Views)

I would just move the Build Array to inside of the FOR loop and have that result autoindex out of the loop.  This will result in a 2D array formatted the way you want.


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
0 Kudos
Message 3 of 4
(2,536 Views)

Also, why do you think you need to take the array subsets? Since N=10, the raw arrays already have the correct length.

0 Kudos
Message 4 of 4
(2,524 Views)