how to reshape a matrix to a vector?

1 次查看(过去 30 天)
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

采纳的回答

Walter Roberson
Walter Roberson 2018-5-21
reshape(A.', 1, [])

更多回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by