Warning: Explicit integral could not be found. I got this warning while integrating a function.
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
function y2 = Fw(t)
p = 0.5
num_gamma= gamma(3/p);
den_gamma= gamma(1/p);
global a;
a=(p/2)*(((num_gamma)^(1/2))/((den_gamma)^(3/2)));
global b;
b=(num_gamma/den_gamma)^(p/2);
syms u;
y2 = int(a*exp(-b*((abs(u))^p)),u,(-inf),t);
end
---------------
On calling the function Fw(t), I'm getting the warning that "Explicit integral could not be found."
And the solution is some complex equation in terms of t.
help me out
2 个评论
Star Strider
2016-5-30
Use numeric integration instead.
Walter Roberson
2016-5-30
编辑:Walter Roberson
2016-5-30
Is there additional information about the valid range of p? In particular is p in the range 0 to 1? If so, can it exactly equal 0 or 1?
Also, is it possible that t < 0 ?
回答(1 个)
John D'Errico
2016-5-30
编辑:John D'Errico
2016-5-30
0 个投票
I imagine people think computers are all-powerful. After all, they seem to be so in the movies, the TV shows. Computers can do anything, with two keystrokes, all in a millisecond. Wrong. Unless you happen to work on one of those TV shows. In fact, it is trivial to write a problems that has no analytical solution, or a problem that will take a virtually infinite amount of time to solve.
"Explicit integral could not be found" is a hint there. So while it is possible a solution does exist, there is a good chance one does not exist.
The solution is to use numerical integration, so integral, or one of the quad tools. You need to be careful there of course, as it is equally easy to trip up a numerical integration tool.
By the way, there was no need to define a and b as global variables. You were just wasting CPU cycles.
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!