Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
JDI
JDI el 12 de Jun. de 2015
Comentada: Walter Roberson el 15 de Jun. de 2015
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 comentarios
Walter Roberson
Walter Roberson el 12 de Jun. de 2015
Are you looking for an exact result or for a numeric result?
JDI
JDI el 15 de Jun. de 2015
Walter, I am looking for a numeric result

Iniciar sesión para comentar.

Respuestas (1)

Andrew Schenk
Andrew Schenk el 15 de Jun. de 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 comentarios
JDI
JDI el 15 de Jun. de 2015
Thanks Andrew, the constants are H=1524e-6 and T=35e-6
Walter Roberson
Walter Roberson el 15 de Jun. de 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?

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by