how can I convert a matrix to an array

464 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by