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).

 Accepted Answer

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

3 Comments

Better to use transpose rather than conjugate transpose.
Thanks Stephen
Thanks kssv

Sign in to comment.

More Answers (0)

Products

Release

R2019a

Community Treasure Hunt

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

Start Hunting!