Warning: Infinite or Not-a-Number value encountered.

3 Ansichten (letzte 30 Tage)
mohamed elkasemy
mohamed elkasemy am 9 Feb. 2019
Bearbeitet: mohamed elkasemy am 11 Feb. 2019
g = 1;
m = 1;
M = 1;
fun = @(x,y,V,T) ((2*pi*g*V*sqrt(1-V.^2)/m)*y.*(((x-(m*V./sqrt(1-V.^2))).^2./(1-(V).^2))+y.^2).*exp(-(sqrt(m^2+x.^2+y.^2)-M)/T));
QQ_pl = @(V,T) integral2(@(y,x) fun(x,y,V,T), 0, inf, -inf, m*V./sqrt(1-V.^2));
QQ_mi = @(V,T) integral2(@(y,x) fun(x,y,V,T), 0, inf, m*V./sqrt(1-V.^2), inf);
E(1)=10
T(1)=100;
V(1)=sqrt(1-(m/E(1)).^2)
L=0;
dL=0.01;
t(1)=L+dL;
dE(1)=V(1)*(QQ_mi(V(1),T(1))-QQ_pl(V(1),T(1)))*t(1)
n=5;
for i=2:n
t(i)=L+i*dL;
dE(i)=V(i-1)*(QQ_mi(V(i-1),T(i-1))-QQ_pl(V(i-1),T(i-1)))*t(i);
E(i)=E(i-1)-dE(i);
V(i)=sqrt(1-(m/E(i)).^2);
T(i)=T(i-1)+(dE(i)/(4*T(i-1)^(3)*5.67*10^(-8)));
end
  2 Kommentare
YT
YT am 9 Feb. 2019
Please clarify in words what is going wrong and where (line) the error occurs
mohamed elkasemy
mohamed elkasemy am 11 Feb. 2019
Warning: Infinite or Not-a-Number value encountered.
> In integralCalc/midpArea (line 397)
In integralCalc (line 65)
In integral2Calc>@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions)
In integral2Calc>@(x)arrayfun(@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions),x,ymin(x),ymax(x)) (line 17)
In integralCalc/iterateScalarValued (line 314)
In integralCalc/vadapt (line 132)
In integralCalc (line 83)
In integral2Calc>integral2i (line 20)
In integral2Calc (line 7)
In integral2 (line 106)
In EVTt1>@(V,T)integral2(@(y,x)fun(x,y,V,T),0,inf,m*V./sqrt(1-V.^2),inf)
In EVTt1 (line 19)

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Particle & Nuclear Physics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by