how can I convert a matrix to an array
352 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Vishnu M S
am 16 Jan. 2013
Kommentiert: Berk Kucukoglu
am 18 Feb. 2022
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 Kommentar
Akzeptierte Antwort
Thorsten
am 16 Jan. 2013
Bearbeitet: Thorsten
am 16 Jan. 2013
B = A';
B = B(:)';
1 Kommentar
Berk Kucukoglu
am 18 Feb. 2022
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? :)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!