convert column vectors to 2D array
5 ビュー (過去 30 日間)
古いコメントを表示
Hello,
If you had two column vectors (2 columns of data) in the workspace, how could you convert this to a 2D array?
Thanks for your help
0 件のコメント
回答 (2 件)
Azzi Abdelmalek
2012 年 10 月 2 日
編集済み: Azzi Abdelmalek
2012 年 10 月 2 日
a=[1;2;3]
b=[11;12;13]
v=[a'; b'] % vertical concatenation
w=[a b ] % horizontal concatenation
0 件のコメント
Wayne King
2012 年 10 月 2 日
Also, you can use cat()
x = randn(100,1);
y = randn(100,1);
z = cat(2,x,y);
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!