Help on solving equation?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
ABDULLA RAHIL
el 29 de Abr. de 2019
Respondida: Stephan
el 29 de Abr. de 2019
Hello,
I need urgent help for the small code belwo to solave the equation I jave tried but I always seeing this error ((Error: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters)).
Code is belwo:
A1=1.825*10^6;
Zi=67;
M=123;
B=50.29;
a=5;
Z=134;
AO0=2.6;
P0=54.6;
C=12;
Ka=2.45;
V=10^((-A1*(Zi^2)*sqrt(M))/(1+B*a*sqrt(M)));
syms A
eqn=AO0-(C*V*(A*(((1-Z*C^0.5)^(-1))+((AO0-P0)/(2*A))/(1+((AO0-P0)/(2*AO0))-(AO0/2)))*(Ka/AO0)-(A*(((1-Z*C^0.5)^(-1))+((AO0-P0)/(2*A))/(1+((AO0-P0)/(2*AO0)));
sola = solve(eqn, A)
1 comentario
KALYAN ACHARJYA
el 29 de Abr. de 2019
My suggestion break the eqn statement in multiple parts, because it is confusing check.
Respuesta aceptada
Stephan
el 29 de Abr. de 2019
Hi,
try:
A1=1.825*10^6;
Zi=67;
M=123;
B=50.29;
a=5;
Z=134;
AO0=2.6;
P0=54.6;
C=12;
Ka=2.45;
V=10^((-A1*(Zi^2)*sqrt(M))/(1+B*a*sqrt(M)));
syms A
eqn=AO0-C*V*A*(((1-Z*C^0.5)^(-1))+((AO0-P0)/(2*A))/(1+((AO0-P0)/(2*AO0))-(AO0/2)))*(Ka/AO0)-(A*(((1-Z*C^0.5)^(-1))+((AO0-P0)/(2*A))/(1+((AO0-P0)/(2*AO0)))));
sola = double(solve(eqn, A))
result is:
sola =
133.8103
Does this appear to be a correct result? If not check the parenthesis of your equation.
Best regards
Stephan
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!