How do I compute symbolic integrals
Afficher commentaires plus anciens
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));
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!