Reshape matrix (Special case)

1 次查看(过去 30 天)
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
A = rand(360,1) ;
iwant = reshape(A,3,[])';

更多回答(0 个)

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by