How to concatenate matrix row wise to get a column vector
21 ビュー (過去 30 日間)
古いコメントを表示
I have a matrix
A = [1,2,3,4
5,6,7,8
9,10,11,12]
How do I make it into a column vector by concatenating the rows, such that I get B = [1,2,3,4,5,6,7,8,9,10,11,12]
Thanks!
0 件のコメント
採用された回答
その他の回答 (1 件)
Star Strider
2016 年 11 月 19 日
Another approach:
B = A';
B = B(:)'
B =
1 2 3 4 5 6 7 8 9 10 11 12
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!