MATLAB: Creating a 3D array out of multiple 2D arrays

image analysisimage processingmask

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!

Best Answer

cat(3,mask1,mask2,...)
doc cat %for more info