Creating an Array of Arrays in LabVIEW

Updated Dec 29, 2023

Reported In

Software

  • LabVIEW

Issue Details

  • I see LabVIEW does not support creating an array of arrays. Is there a similar data structure that can be used?

Solution

You can use an array of clusters of arrays to create a similar structure to an array of arrays. The top-level control is an array of clusters, and each cluster contains a single element, which is an array. This technique effectively allows you to store arrays of different lengths within an array. 
image.png

When you are generating the array of arrays on the diagram, you can do so with a Bundle function to add the cluster layer. Then you can use an Unbundle function when you need to retrieve one of the nested arrays:
image.png