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 Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by