title: Separating then stacking 3D mat files
body: <p>So I have a large amount of mostly 2D mat files that I need to stack, however some of the files were saved in 3d, i.e. they are 1024*1024*2. I'm struggling to write a while loop that will separate the 3d files and stack them while also stacking the normal 2d files.</p>