Are you sure you need to do that? It seems like a waste of memory to copy the same image 10 times. If you're sure it's what you want, however,
mask_3d=repmat(mask_2d,1,1,10);
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!