What is the best way to solve 3 equations and 3 unknowns

조회 수: 6 (최근 30일)
JDI
JDI 2015년 6월 12일
댓글: Walter Roberson 2015년 6월 15일
I have 3 equations and 3 unknowns. This is the code I have right now to solve them-
///
syms w0 w1 S
a1= (-8.84*((w0+w1)/(2*H))^-0.38) + (0.89*T/H)^0.95;
b1= ((S/H)+0.78)^-1.85;
c1= (9.5*((w0+w1)/(2*H)))^-0.34;
d1= ((S/H)+0.807)^-1.0;
a2= (-1.02*(w0/H)^-0.38) + (1.24*(T/H)^0.052);
b2= exp(-2.86*S/H);
c2= ((0.563*(w0/H)^0.071) + (1.96*(T/H)^1.23))^-1.0;
a3= (-1.02*(w1/H)^-0.38) + (1.24*(T/H)^0.052);
b3= exp(-2.86*S/H);
c3= ((0.563*(w1/H)^0.071) + (1.96*(T/H)^1.23))^-1.0;
solve(C01_Eo_sqrtEre==(a1*b1)+(c1*d1),C0_Eo_sqrtEre==a2+(b2*c2),C1_Eo_sqrtEre==a3+(b3*c3),w0,w1,S)
///
So I know all the other values in the equations except w0,w1, and S. When I run this code, it takes a really long time. I havent seen any result. When I terminate it, I see this error- "Operation terminated by user during mupadengine/evalin (line 97)" What is the best way to solve this? Thank you
  댓글 수: 2
Walter Roberson
Walter Roberson 2015년 6월 12일
Are you looking for an exact result or for a numeric result?
JDI
JDI 2015년 6월 15일
Walter, I am looking for a numeric result

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

답변 (1개)

Andrew Schenk
Andrew Schenk 2015년 6월 15일
I am not able to reproduce the same behavior because I am not sure what the specific constants are in your equations. However, as Walter mentioned, if a numeric (as opposed to symbolic) answer is acceptable, use the following code instead:
vpasolve(C01_Eo_sqrtEre==(a1*b1)+(c1*d1),C0_Eo_sqrtEre==a2+(b2*c2),C1_Eo_sqrtEre==a3+(b3*c3),w0,w1,S)
  댓글 수: 2
JDI
JDI 2015년 6월 15일
Thanks Andrew, the constants are H=1524e-6 and T=35e-6
Walter Roberson
Walter Roberson 2015년 6월 15일
At the moment you have 3 equations in 6 unknowns, S, w0, w1, C01_Eo_sqrtEre, C0_Eo_sqrtEre, C1_Eo_sqrtEre. Are there specific values for the C* variables?

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by