How to reshape a matrix
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello , i've got a k by l by m by n by o matrix and i want to reshape it into a vector.. Any ideas?
0 commentaires
Réponse acceptée
James Tursa
le 13 Sep 2012
A = zeros(k,l,m,n,o);
B = A(:); % column vector
C = B.'; % row vector
For more general reshaping, see the reshape command.
0 commentaires
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!