ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to split a 2D array and create 3D array

Hi,

 

I have a 2D array

Let's say

 

1  2   3   4

2  0   0   0

9   5  6   8

4  0   0   0

 

and I want to split it into 2 pages 

 

Page 1

1  2   3   4

2  0   0   0

 

Page 2

9   5  6   8

4  0   0   0

 

Number of rows and coloumns can be any number and the plit value also can be 2 , 4 or any number 

 

Please help me to implement this

 

0 Kudos
Message 1 of 3
(3,500 Views)

Hope this will help you

3d array.png

Happy to Wire
0 Kudos
Message 2 of 3
(3,497 Views)

Since the elements remain in memory order, I would just use a plain reshape operation. (One step. No need to chop and reassemble)

 

 

 

(assumes that things are evenly divisible. If not, you might need to do some padding and such)

0 Kudos
Message 3 of 3
(3,475 Views)