how to stack 2 dimensional arrays into 3 dimensional aarays?

109 views (last 30 days)
I have Nine(9) , 2-D arrays of size 3200x8.
I want to stack them into a 3D array so that I could have a final aaray of size 3200x8x9.
Please help!

Accepted Answer

Bruno Luong
Bruno Luong on 28 Aug 2019
If 2D arrays are stored in 9 variables
If they are stored in 1x9 cell C
cat(3, C{:});

More Answers (1)

darova on 28 Aug 2019
Use cat()
Stephen23 on 28 Aug 2019
Edited: Stephen23 on 28 Aug 2019
"I have Nine, 2D arrays of dimesnions 3200x8, and I want them to change a single 3D array of size 3200x8x9."
Sure, use cat.

Sign in to comment.


Find more on Matrices and Arrays in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!