필터 지우기
필터 지우기

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]

답변 (1개)

madhan ravi
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
>>

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by