How do I compute symbolic integrals
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
sherry zhang
le 7 Mai 2019
Réponse apportée : madhan ravi
le 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 commentaires
Réponse acceptée
madhan ravi
le 7 Mai 2019
Wanted=zeros(size(t));
for k=1:numel(t)
Wanted(k)=integral(f,0,t(k));
end
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!