How to reverse a Ax=b system of equation to find an A value from a x and b value

조회 수: 2 (최근 30일)
I have a system of equations that calculates for an i value called i4. This value is an x in the Ax
=b system of equation format. I have the given input A vector, and b vector. I have to find a R3 value which gives me an i4 value of 0.0157. I do not know how to reverse the calculation so that it gives me a R value instead. I HAVE to use a Fzero command, but I do not know how to integrate that either.
R1=4000;
R2=8000;
R3=R3;
R4=2000;
R5=5000;
v=125;
A=[0 R2 0 R4 0 0
-R1 R2 -R3 0 0 0
0 0 R3 R4 -R5 0
1 1 0 0 0 -1
0 1 1 -1 0 0
-1 0 1 0 1 0];
b=[v 0 0 0 0 0]';
x=A\b;
i4=x(4,:) %i4=0.0157

채택된 답변

David Hill
David Hill 2021년 8월 3일
R1=4000;
R2=8000;
syms R3;
R4=2000;
R5=5000;
v=125;
A=[0 R2 0 R4 0 0
-R1 R2 -R3 0 0 0
0 0 R3 R4 -R5 0
1 1 0 0 0 -1
0 1 1 -1 0 0
-1 0 1 0 1 0];
b=[v 0 0 0 0 0]';
x=A\b;
F=vpasolve(x(4)==0.0157,R3);
  댓글 수: 2
Petch Anuwutthinawin
Petch Anuwutthinawin 2021년 8월 4일
Is there a way to do this with only the Fzero command and no syms. I cannot use syms in my version of matlab?
David Hill
David Hill 2021년 8월 4일
Solved for R3 in terms of R1,R2,R4,R5,v, and i4.
R1=4000;
R2=8000;
R4=2000;
R5=5000;
v=125;
i4=0.0157;
R3=-(R1*R5*conj(v) - i4*(R2*R4*R5 + R1*R4*R5 + R1*R2*R5 + R1*R2*R4) + R2*R5*conj(v))/(R1*conj(v) - i4*(R4*R5 + R2*R5 + R1*R4 + R1*R2) + R5*conj(v));

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by