LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create 2D array

Solved!
Go to solution

FOR loop to autoindex on the array of clusters.  Unbundle the array in the cluster and use Build Array to add a -1 to the end.  While adding on the -1, add the array to the building array.


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
Message 11 of 16
(823 Views)

Now you get a -1 as the very last element, not exactly the same as the original input, but probably close enough. 😄

0 Kudos
Message 12 of 16
(818 Views)

@altenbach wrote:

Now you get a -1 as the very last element, not exactly the same as the original input, but probably close enough. 😄


That's your mistake.  The OP had a -1 at the end of the original array.


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 13 of 16
(815 Views)

You're right, but I was talking about the actual snippet. If there is a guaranteed -1 as last element, my code can be further simplified, i think.... (we don't need the code after the loop, for example)

0 Kudos
Message 14 of 16
(812 Views)
Solution
Accepted by topic author sonotk

If the last element is always -1, we can do the following (also assuming we have LabVIEW 2012 and concatenating output tunnels ;))

 

Message 15 of 16
(800 Views)

Thanks all for the code and explanation.

0 Kudos
Message 16 of 16
(789 Views)