Have a matrix (360,1), I want to put every 3 elements in a row, the next 3 elements in the second row in new matrix and so on to be the new matrix (120,3).

 採用された回答

KSSV
KSSV 2020 年 6 月 5 日

1 投票

A = rand(360,1) ;
iwant = reshape(A,3,[])';

3 件のコメント

Stephen23
Stephen23 2020 年 6 月 5 日
Better to use transpose rather than conjugate transpose.
bashar halleem
bashar halleem 2020 年 6 月 5 日
Thanks Stephen
bashar halleem
bashar halleem 2020 年 6 月 5 日
Thanks kssv

サインインしてコメントする。

その他の回答 (0 件)

製品

リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by