필터 지우기
필터 지우기

How to add a value to a already existing matrix?

조회 수: 2 (최근 30일)
Rachuan
Rachuan 2014년 9월 7일
댓글: Mahesh 2014년 9월 7일
KB=[1 3;4 5] for i:Nbarras Mgl(i,1)= Mgl(i,1) + KB(i,1)
which method is correct? for i:Nbarras Mgl(i,1)= Mgl(i,1) + KB(i,1)
or for i:Nbarras Mgl(i,1)=+KB(i,1)
or somehow else?

채택된 답변

Mahesh
Mahesh 2014년 9월 7일
I hope the correct one, if you have already defined Mgl, is
Mgl(1,1)= Mgl(1,1) + KB(1,1)
Good luck
  댓글 수: 2
Rachuan
Rachuan 2014년 9월 7일
When i do it like that it shows
"Undefined function 'Mgl' for input arguments of type 'double'."
Mahesh
Mahesh 2014년 9월 7일
you need to define Mgl matrix if you do not have like
Mgl = zeros(2,2)

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by