Symbolic Computations for three non-linear equations solution

조회 수: 6 (최근 30일)
rfcalculus
rfcalculus 2023년 3월 17일
댓글: rfcalculus 2023년 3월 20일
Dear community members,
I am trying to find three unknown values A,fu and alpha using three equations:
fl = [1.883806, 1.883135, 1.882170]*10^9;
Qe = [161.43, 10.765, 2.5734]*10^4;
syms A fu alpha
eq1=fl(1)-(1+(A/(Qe(1)^alpha)))*fu==0;
eq2=fl(2)-(1+(A/(Qe(2)^alpha)))*fu==0;
eq3=fl(3)-(1+(A/(Qe(3)^alpha)))*fu==0;
roots = vpasolve(eq1,eq2,eq3,A,fu, alpha)
A = double(roots.A)
alpha = double(roots.alpha)
fu = double(roots.fu)
The results I get:
A: 23.111701126115183488493226207409
fu: 1883037000.0
alpha: 9.7722388976929995256469179038887
Are different from the expected ones:
A = -0.1555;
fu=1.88406316*10^9;
alpha = 0.4967;
Could you please let me know how can I adjust the results?

채택된 답변

Torsten
Torsten 2023년 3월 17일
편집: Torsten 2023년 3월 17일
fl = [1.883806, 1.883135, 1.882170]*10^9;
Qe = [161.43, 10.765, 2.5734]*10^4;
syms A fu alpha
eq1=fl(1)-(1+(A/(Qe(1)^alpha)))*fu==0;
eq2=fl(2)-(1+(A/(Qe(2)^alpha)))*fu==0;
eq3=fl(3)-(1+(A/(Qe(3)^alpha)))*fu==0;
roots = vpasolve([eq1,eq2,eq3],[A,fu, alpha],[-0.1555;1.88406316*10^9;0.4967] )
roots = struct with fields:
A: -0.1770775480947061932261999744466 fu: 1884030476.7824237850125485618186 alpha: 0.51096779065904968571811061519679
Anum = double(roots.A)
Anum = -0.1771
alphanum = double(roots.alpha)
alphanum = 0.5110
funum = double(roots.fu)
funum = 1.8840e+09
double(subs([lhs(eq1),lhs(eq2),lhs(eq3)],[A,fu,alpha],[Anum,funum,alphanum]))
ans = 1×3
1.0e-07 * 0.5017 0.4977 0.4929
double(subs([lhs(eq1),lhs(eq2),lhs(eq3)],[A,fu,alpha],[-0.1555,1.88406316*10^9,0.4967]))
ans = 1×3
1.0e+04 * -1.5436 -0.0424 -0.4617

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by