I have a 3d matrix (n-by-m-by-t) in MATLAB representing n-by-m measurements in a grid over a period of time. I would like to have a 2d matrix, wher
A better solution to this problem is to use nshape.m available from Rasmus Bro's N-Way Toolbox. That will allow you to reshape along a given mode, which is a little more tricky with the reshape command.
The toolbox is available at the following link:
https://www.mathworks.com/matlabcentral/fileexchange/1088-the-n-way-toolbox
There are some other excellent tools there to help with array manipulation as well.