how can I convert a matrix to an array
조회 수: 290 (최근 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
채택된 답변
Thorsten
2013년 1월 16일
편집: Thorsten
2013년 1월 16일
B = A';
B = B(:)';
댓글 수: 1
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 Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!