NAN when we integrate

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 ??

Respuestas (1)

Youssef  Khmou
Youssef Khmou el 25 de Dic. de 2013

0 votos

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 comentarios

mutah
mutah el 26 de Dic. de 2013
it's ploted 2 lines
Youssef  Khmou
Youssef Khmou el 27 de Dic. de 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);

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Preguntada:

el 25 de Dic. de 2013

Comentada:

el 27 de Dic. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by