MATLAB Answers

mutah
0

NAN when we integrate

Asked by mutah
on 25 Dec 2013
Latest activity Commented on by Youssef Khmou
on 27 Dec 2013
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 ??

  0 Comments

Sign in to comment.

1 Answer

Youssef  Khmou
Answer by Youssef Khmou
on 25 Dec 2013

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 Comments

mutah
on 26 Dec 2013
it's ploted 2 lines
Youssef Khmou
on 27 Dec 2013
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);

Sign in to comment.