Effacer les filtres
Effacer les filtres

how to reshape a matrix to a vector?

1 vue (au cours des 30 derniers jours)
sama
sama le 21 Mai 2018
Réponse apportée : sama le 21 Mai 2018
I have a matrix for example [1 2 3; 4 5 6; 7 8 9]. I want to return it to [1 2 3 4 5 6 7 8 9] how can I do that please? Thanks

Réponse acceptée

Walter Roberson
Walter Roberson le 21 Mai 2018
reshape(A.', 1, [])

Plus de réponses (1)

sama
sama le 21 Mai 2018
Thanks a lot. I used reshape but totally had forgot about transpose ('). Thank you

Catégories

En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by