フィルターのクリア

how can I convert a matrix to an array

213 ビュー (過去 30 日間)
Vishnu M S
Vishnu M S 2013 年 1 月 16 日
コメント済み: Berk Kucukoglu 2022 年 2 月 18 日
I have a matrix say, A=
1 8 4 6
2 1 7 5
8 3 3 9 .
I need the elements in an array called B like B=[1 8 4 6 2 1 7 5 8 3 3 9].
Please help me.
  1 件のコメント
José-Luis
José-Luis 2013 年 1 月 16 日
編集済み: José-Luis 2013 年 1 月 16 日
Repeated question:
How did the answer you were given not solve your problem. Instead of asking a new question please explain what you actually want.
Please accept an answer if it helped you.

サインインしてコメントする。

採用された回答

Thorsten
Thorsten 2013 年 1 月 16 日
編集済み: Thorsten 2013 年 1 月 16 日
B = A';
B = B(:)';
  1 件のコメント
Berk Kucukoglu
Berk Kucukoglu 2022 年 2 月 18 日
This worked for me, therefore I upvoted. Thank you.
However, I don't understand why it works. And is it always guaranteed to work between updates? Like, is this a bug or a feature? :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by