From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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
(2,824 Views)

Hope this will help you

3d array.png

Happy to Wire
0 Kudos
Message 2 of 3
(2,821 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
(2,799 Views)