how to reshape a matrix to a vector?

2 ビュー (過去 30 日間)
sama
sama 2018 年 5 月 21 日
回答済み: sama 2018 年 5 月 21 日
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 Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by