Reshape matrix (Special case)

1 vue (au cours des 30 derniers jours)
bashar halleem
bashar halleem le 5 Juin 2020
Commenté : bashar halleem le 5 Juin 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).

Réponse acceptée

KSSV
KSSV le 5 Juin 2020
A = rand(360,1) ;
iwant = reshape(A,3,[])';
  3 commentaires
bashar halleem
bashar halleem le 5 Juin 2020
Thanks Stephen
bashar halleem
bashar halleem le 5 Juin 2020
Thanks kssv

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by