What is the best way to solve 3 equations and 3 unknowns
Show older comments
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 Comments
Walter Roberson
on 12 Jun 2015
Are you looking for an exact result or for a numeric result?
JDI
on 15 Jun 2015
Answers (1)
Andrew Schenk
on 15 Jun 2015
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 Comments
JDI
on 15 Jun 2015
Walter Roberson
on 15 Jun 2015
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?
Categories
Find more on Numeric Solvers in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!