필터 지우기
필터 지우기

Why do I get empty result?

조회 수: 1 (최근 30일)
Faezeh Manesh
Faezeh Manesh 2020년 5월 4일
댓글: Faezeh Manesh 2020년 5월 5일
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
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
Faezeh Manesh
Faezeh Manesh 2020년 5월 5일
Thanks. Then how can I find the peak? My ultimate goal is to find the peak in terms of a and b

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

답변 (1개)

Steven Lord
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?
  댓글 수: 1
Faezeh Manesh
Faezeh Manesh 2020년 5월 5일
Actually what I am trying to do is as follows:
I have a diferential equation which has the following form:
when I solved this (with a and b known) and thenfind dy/dT in terms of T, it becomes a figure like this:
I am trying to find the peak in terms of a and b. So, firstly I solved my differential equation symbollicaly in MATLAB to find y(T), then I differentiate dy/dT once more to find dy2/dT2 in terms of y and T. Then I substituted y(T) which had been obtained previously in it. So, my equation would only be in terms of T and then I want to put it equal to zero to find the peak in terms of a and b. but here I substituted my experimental value for a and b o check my answer. So, all I found is from MATLAB

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

카테고리

Help CenterFile Exchange에서 Function Creation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by