How to append matrices? For example, if I have a 3*3 matrix and a 1*3 matrix, how to append them such that the resultant is a 4*3 matrix?
조회 수: 1 (최근 30일)
이전 댓글 표시
3*3=[1 2 3;2 3 4;4 5 6]
1*3=[1 2 3]
4*3=[1 2 3;2 3 4;4 5 6;1 2 3]
댓글 수: 0
답변 (1개)
madhan ravi
2019년 7월 29일
편집: madhan ravi
2019년 7월 29일
a=[1 2 3;2 3 4;4 5 6];
b=[1 2 3];
c=[a;b] % 4 X 3
Gives:
c =
1 2 3
2 3 4
4 5 6
1 2 3
>>
댓글 수: 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!