How to add 2 or 3 tables in column wise ?
2 ビュー (過去 30 日間)
古いコメントを表示
Badavath Purnesh Singh
2021 年 8 月 5 日
コメント済み: Badavath Purnesh Singh
2021 年 8 月 5 日
I got four tables of size 50*1, how can I add them column wise so that i can get 200*1 table ?
0 件のコメント
採用された回答
Chunru
2021 年 8 月 5 日
% for array
a = randn(5,1); b = randn(5,1); c = randn(5, 1); d = randn(5,1); % 5->50
x = [a; b; c; d]
その他の回答 (1 件)
Awais Saeed
2021 年 8 月 5 日
% create four matrices of size 50*1
A = zeros(50,1);
B = ones(50,1);
C = zeros(50,1);
D = ones(50,1);
% arrange them column-wise
new_mat = [A;B;C;D];
You can also use vertcat
vertcat(vertcat(vertcat(A,B),C),D);
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!