Reshape column vector

前端 未结 2 656

Hello I\'m working with MATLAB and I have a \"z\" column vector that has dimension of (9680 x 1). I want to reshape it in order to have an array \"z\" of di

2条回答
  •  难免孤独
    2020-12-21 06:25

    Matlab stores the matrix values in column major format (this is important during reshape). Since you want row major, you need to do

    z = reshape(z, [220 44]).';
    

    i.e. transpose afterwards.

提交回复
热议问题