MATLAB: Could anyone help me to plot this integral function

integralplot

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);,

Best Answer

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!
Related Question