Reshape 3d matrix to 2d matrix

前端 未结 3 1041
栀梦
栀梦 2020-12-01 18:21

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

3条回答
  •  盖世英雄少女心
    2020-12-01 18:47

    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.

提交回复
热议问题