Why do I get empty result?
4 次查看(过去 30 天)
显示 更早的评论
Hello all,
I have the following equation that needs to be solved by MATLAB but it gives me empty sym. I don't know why
syms T a b
eqn= (a*b*exp(b/T)*((1 - exp(a*b*ei(b/T) - T*a*exp(b/T))*exp(294*a*exp(b/294) - a*b*ei(b/294))) - 1))/T^2 == 0;
solT = solve(eqn,T)
Even when I give values for a and b, MATLAb gives me the same message:
syms T
a=(exp(183.8)/1.5);
b=-6.2662e+04;
eqn= (a*b*exp(b/T)*((1 - exp(a*b*ei(b/T) - T*a*exp(b/T))*exp(294*a*exp(b/294) - a*b*ei(b/294))) - 1))/T^2 == 0;
solT = solve(eqn,T)
I would be thankful if someone help me with this.
6 个评论
darova
2020-5-5
I draw you function
a = (exp(183.8)/1.5);
b = -6.2662e+04;
F = @(x) (a*b*exp(b/x)*((1 - exp(a*b*ei(b/x) - x*a*exp(b/x))*exp(294*a*exp(b/294) - a*b*ei(b/294))) - 1))/x^2;
x = linspace(100,400);
y = arrayfun(F,x);
plot(x,y)
% x0 = [300];
% x = fsolve(odefun,x0);
ylim([-1 1]*0.1)
Result
回答(1 个)
Steven Lord
2020-5-4
When I display the expression in the Live Editor, I see that the numerator of the expression is the product of a (very large) constant positive value and two exponentials. That numerator, divided by T^2, is supposed to be equal to 0.
The constant is positive. The values of the two exponentials are only 0 in the limit; there's no finite value z for which exp(z) is 0.
So MATLAB correctly gave the answer that there is no solution to your equation as written.
Your expression does look a little unusual, though. Did you intend to have the Ei and one of the exponentials inside the exponent of another exponential call? Maybe there's a parenthesis in the wrong place?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!