LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help assigning elements to a 1d array

Hi all
I'm using, thanking to your quickly and detailed answers,labview from a few
days,
in my Vi I've now a little trouble,
I have, in a for loop structure, 480 integers that came up from an internal
formula
in for,
how can I build a 1d array of dimension 1*480 with all this numbers,

In other words do I need to initialize this array? (for example an array
1*480 filled with zeros),
or I could build it simply appending each number to the previous one and the
array will be every time increased of a unit in terms of dimension?

Thanks a lot to all.

Best regards


Sonic
0 Kudos
Message 1 of 3
(2,728 Views)
If you are using a FOR loop you don't have to do anything. Simply wire out through the side of the loop structure and outside the loop the wire will become a 1D array like you wish. LV does this automatically. It's called auto-indexing.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 3
(2,728 Views)
There are many different ways to build arrays in for loops. I demonstrate 3 ways in the attached example code. You can build arrays on the edge of for loops (Auto-Indexing), with the build array function and shift registers, and finally you can initialize and array and replace all the elements in the array. I hope you find this helpful.
0 Kudos
Message 3 of 3
(2,728 Views)