reshaping a matrix dimension
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
AA
le 24 Déc 2014
Réponse apportée : Star Strider
le 24 Déc 2014
Hi, I have a 2x60 matrix and I want to reshape it to a 120x1 matrix. How can I do that?
0 commentaires
Réponse acceptée
Star Strider
le 24 Déc 2014
It depends on how you want the (120x1) matrix to look. Here are two possibilities:
A = [1:5; 6:10];
B1 = reshape(A, [], 1);
B2 = reshape(A', [], 1);
0 commentaires
Plus de réponses (0)
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!