필터 지우기
필터 지우기

Adding two matrices of different sizes?

조회 수: 4 (최근 30일)
Bibhu Prasad Pala
Bibhu Prasad Pala 2017년 6월 9일
편집: Walter Roberson 2017년 6월 10일
A=[1 2 3 4;8 7 9 6 ;4 5 6 1]
B=[4 8 9 8 ;1 2 3 4 ]
how can i add A and B?
  댓글 수: 3
KSSV
KSSV 2017년 6월 9일
YOu have to extend B's size to A either by padding zeros at first row or end row and then add.
Stephen23
Stephen23 2017년 6월 9일
@ Bibhu Prasad Pala: of course this can be done, once you define what you mean by "Adding two matrices of different sizes". For example, matrix A has three rows, but matrix B has only two rows: what would you expect the values in the third row of A to be added to?

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by