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 Commento

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

Accedi per commentare.

 Risposta accettata

KALYAN ACHARJYA
KALYAN ACHARJYA il 23 Ott 2019
Modificato: KALYAN ACHARJYA il 23 Ott 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!

Più risposte (0)

Categorie

Scopri di più su MATLAB in Centro assistenza e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by