How to merge 2 tables wtih thw same rows and columns?

조회 수: 1 (최근 30일)
Ivan Mich
Ivan Mich 2020년 12월 7일
댓글: Abhay Mohan 2020년 12월 7일
Hello. I have a question.
How to merge 2 tables wtih thw same rows and columns? (I have 1000x1 tables, that I want to merge the rows of them. I mean I would like finally to have one 1000x1 table) ?

채택된 답변

Abhay Mohan
Abhay Mohan 2020년 12월 7일
Is this what you're looking for?
t1 = ones(1000,1); %Table 1 (a column vector)
t2 = 2*ones(1000,1); %Table 2 (a column vector)
t_merged = [t1,t2]; %Merged table (a 1000 x 2 matrix)
Or, do you want another merged table which is again 1000x1, with elements joined together? If so, then this answer might help you:
https://in.mathworks.com/matlabcentral/answers/355755-merge-two-columns-into-one
  댓글 수: 2
Ivan Mich
Ivan Mich 2020년 12월 7일
I know the way you provided, I would like to create 1000x1, and NOT 1000x2 . Is there a way ?
Abhay Mohan
Abhay Mohan 2020년 12월 7일
Just check the link I provided in my answer, the method is described in that answer. Again, the link is pasted here as well: https://in.mathworks.com/matlabcentral/answers/355755-merge-two-columns-into-one

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by