LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract 2D sub-arrays having different number of rows from a given 2D array?

Solved!
Go to solution

I am trying to extract 2D sub-arrays from a given 2D array. The inputs for each sub-array are the starting row index and the number of rows to be extracted, which will be different for different sub-arrays. Below is an example; however, LabVIEW forces all sub-arrays to have the same number of rows (I guess since LabVIEW does not support array of arrays having different sizes). How can I get around this?

 

Subarray Extraction.png

0 Kudos
Message 1 of 5
(2,986 Views)
Solution
Accepted by topic author murchak

Use Bundle/unbundle

 

NewSnippet.png

Message 2 of 5
(2,965 Views)

Clever! Thanks!

0 Kudos
Message 3 of 5
(2,958 Views)

Just be careful with large >1M arrays, depending on what you are doing you may be making multiple copies.

 

mcduff

0 Kudos
Message 4 of 5
(2,953 Views)

I won't get to that many arrays, it I did I'd probably resort to Python.

0 Kudos
Message 5 of 5
(2,942 Views)