NAN when we integrate

2 次查看(过去 30 天)
mutah
mutah 2013-12-25
Hi
I have this code
b=1;mu=1;
f = @(t) (t.^(2*mu)).*exp(-t.^2).*besseli(mu-0.5,a.*t.^2)
Q = integral(f,b,Inf)
but give me Q=NAN ??

回答(1 个)

Youssef  Khmou
Youssef Khmou 2013-12-25
hi, i think NaN can be logical answer, plus a is not provided ,
try :
figure, plot(f(-100:0.1:300))
is the area between f and the ax axis defined ?
  2 个评论
mutah
mutah 2013-12-26
it's ploted 2 lines
Youssef  Khmou
Youssef Khmou 2013-12-27
i tried with a numeric vector, and the returned function contains NaN, so the problem happened before the integration,
r=f(-100:100);
isnan(r);

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by