How to add 2 or 3 tables in column wise ?
조회 수: 2 (최근 30일)
이전 댓글 표시
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!