Reshape matrix (Special case)

1 visualizzazione (ultimi 30 giorni)
bashar halleem
bashar halleem il 5 Giu 2020
Commentato: bashar halleem il 5 Giu 2020
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).

Risposta accettata

KSSV
KSSV il 5 Giu 2020
A = rand(360,1) ;
iwant = reshape(A,3,[])';
  3 Commenti
bashar halleem
bashar halleem il 5 Giu 2020
Thanks Stephen
bashar halleem
bashar halleem il 5 Giu 2020
Thanks kssv

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by