How to convert a matrix to a vector

Hello , I have a square matrix let M=[1,2,4;6,5,7;8,3,9]. Now I have to convert it into a column vector as. c=[1;2;4;6;5;7;8;3;9]. How to do this? Please help.

 採用された回答

Stephan
Stephan 2019 年 10 月 18 日

0 投票

M1=reshape(M.',[],1)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

質問済み:

2019 年 10 月 18 日

回答済み:

2019 年 10 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by