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 Kommentar

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

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 23 Okt. 2019
Bearbeitet: KALYAN ACHARJYA am 23 Okt. 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!

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-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