How can we join two matrices of two dimmention
조회 수: 2 (최근 30일)
이전 댓글 표시
hey everybody i have two matrices of 476*11 i want to join them in one matrix of 952*11 . thanks in advance
댓글 수: 0
채택된 답변
Mischa Kim
2014년 3월 12일
편집: Mischa Kim
2014년 3월 12일
Abdulkareem, simply use
C = [A; B];
where A and B are your 476-by-11 matrices.
A = [1 2 3; 4 5 6];
B = [9 8 7; 6 5 4];
C = [A; B]
C =
1 2 3
4 5 6
9 8 7
6 5 4
댓글 수: 0
추가 답변 (3개)
Sagar Damle
2014년 3월 12일
For two matrices A and B; 1. for horizontal concatenation,use [A,B] or horzcat(A,B). 2. for vertical concatenation,use [A;B]. Also see help about function 'cat()'.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!