Could anyone help me to plot this integral function?

f(t) =(0.217+0.259*exp(-t/172.9)+0.338*exp(-t/18.51)+0.186*exp(-t/1.186));
CF = vpaintegral(f,0,100);,

1 commentaire

darova
darova le 23 Oct 2019
Result of integral is value (one value). How do you want to see it on a graph? Point?

Connectez-vous pour commenter.

 Réponse acceptée

KALYAN ACHARJYA
KALYAN ACHARJYA le 23 Oct 2019
Modifié(e) : KALYAN ACHARJYA le 23 Oct 2019
Is this, as @darova rightly mentioned, it give one value how do you plot, which requires vectors?
syms t
f_t=@(t)(0.217+0.259*exp(-t/172.9)+0.338*exp(-t/18.51)+0.186*exp(-t/1.186));
CF=integral(f_t,0,100)
Command Window:
CF =
47.8161
Or this one:
t=linspace(0,100,500);
f_t=(0.217+0.259*exp(-t/172.9)+0.338*exp(-t/18.51)+0.186*exp(-t/1.186));
CF=cumtrapz(t,f_t);
plot(t,CF);
Hope it helps!

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB 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!

Translated by