Why the results of the matrix X' dont show?

조회 수: 1 (최근 30일)
Ian Samuelsson
Ian Samuelsson 2021년 9월 20일
답변: Stephen23 2021년 9월 20일
I'm just trying to prove if x4 = 0 the matrix X' will be [100+0 -400+0 -500+0 0], but i only recive red flags :(, someone know what i did wrong to fix it ?
A = [0 2 -1 0 ; 0 0 1 -1 ; 1 -1 0 0 ; -1 0 0 1]
B= [100 -500 300 100]
X = inv(A)*B
for x4 = 0:1:100
X' =[-100+x4 -400+x4 -500+x4 x4]
if X'=X
break
end
end
  댓글 수: 3
Ian Samuelsson
Ian Samuelsson 2021년 9월 20일
because i'm trying to prove the values when x4=0, in the question they want to know the values of the matrix when x4=0 (is a trafic application, if the street x4 flow is zero, how this will afect the matrix).
i think that i exaggerated the arguments and got confused, thank you !
Ian Samuelsson
Ian Samuelsson 2021년 9월 20일
put your answer in answer this question plz, soo can i give your tag

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

채택된 답변

Stephen23
Stephen23 2021년 9월 20일
A = [0,2,-1,0;0,0,1,-1;1,-1,0,0;-1,0,0,1];
B = [100;-500;300;100];
X = A\B % more robust than INV(A)*B
X = 4×1
300 0 -100 400

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by