Creating a 3D array out of multiple 2D arrays
Show older comments
I have 10 masks that are 256 x 256 each. These masks are for 10 respective slices, so I want to combine them and make a 3D array ( 256x256x10). How do I do this? Ideas? Thanks!
Accepted Answer
More Answers (2)
Med_Imager
on 13 Feb 2012
Kris Hoffman
on 20 Jul 2020
I just had this exact problem (even with the same dimensions)
If the masks are all in one cell array,
A = cat(3,YourMaskArrayHere{:})
Produces a 256x256x10 uint16 array.
Categories
Find more on Image Arithmetic 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!