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

 Akzeptierte Antwort

KSSV
KSSV am 5 Jun. 2020

1 Stimme

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

3 Kommentare

Stephen23
Stephen23 am 5 Jun. 2020
Better to use transpose rather than conjugate transpose.
bashar halleem
bashar halleem am 5 Jun. 2020
Thanks Stephen
bashar halleem
bashar halleem am 5 Jun. 2020
Thanks kssv

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by