How do I compute symbolic integrals
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
sherry zhang
am 7 Mai 2019
Beantwortet: madhan ravi
am 7 Mai 2019
This is my code,I want to compute symbolic integrals,but the F1 I got is full of NAN.Why?and what should I do?
format long;
t=1:10000:8460000;
k=0.07;b=13.8'; ,
c=3e8;
v=0.062.*c;
eNi=3.9e10;
eCo=6.8e9;
tNi=8.8*86400;
tCo=111.3*86400;
M=1.9891e30;
Mej=2.1.*M;
kr=0.133;
A=(3.*kr.*Mej)/(4.*pi.*v^2);
M_Ni=0.1.*M;
tm=sqrt((2.*k.*Mej)/b.*v.*c);
P=@(x)eNi.* M_Ni.*exp(-x./tNi) + eCo.* M_Ni.*((exp(-x./tCo)-exp(-x./tNi))./(1-tNi/tCo));
f=@(x)exp(x.^2./tm^2).*x./tm.*P(x);
syms a
F=int(f,0,a);
F1=double(subs(F,a,t));
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 7 Mai 2019
Wanted=zeros(size(t));
for k=1:numel(t)
Wanted(k)=integral(f,0,t(k));
end
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox 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!