Matrix formed by Vectors?Easy question.
古いコメントを表示
I have a matrix size=10x10. And I want to obtain each column as a vector. Or vectors will create a matrix. How can I do that? Thanks in advance.
採用された回答
その他の回答 (1 件)
Azzi Abdelmalek
2013 年 7 月 16 日
v=[1 2 3;4 5 6;7 8 9]
v1=v(:,1) % first column
v2=v(:,2)
v3=v(:,3)
% horizontal concatenation
v=[v1 v2 v3]
カテゴリ
ヘルプ センター および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!