LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array within array

I have 10 arrays with 3 elements each.  I would like to index these arrays in a for loop with 10 iterations.  Is it possibel to do the following?

 

1. Puting these 10 arrays into a 1d array with 3 elements embedded into 1 element of the new array, so you would have a 3 elements array inside an element of the 1d array.  Use auto index in for loop.  Is it possible to have array within an element of another array?

2. Putting these 10 arrays into a cluster?  Use auto index in for loop?  How do you auto dinxe a cluster in for loop?

3. Make the 10 arrays into a 2 array.

 

What is the best way?

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 2
(2,051 Views)

There is no "BEST" way. It all depends on how you want to deal with the data. A 2D array is simple and allows you to automatically index from both dimensions. It has the limitation that the array must be rectangular (i.e., you cannot have 1 row with 5 columns and another row with 10 columns). The 1D array of clusters encapsulates the inner arrays so they can be of any size. If you want to autoindex the cluster use the Cluster to Array function.

0 Kudos
Message 2 of 2
(2,045 Views)