问题
I would like to compute circular convolution of Input Concentration values with Output concentration equation and plot accordingly, following are my functions
The function for Input Concentration is computed as follows and the plot of Concentration Vs time is plotted
function c = Input_function(t, a1, a2, a3, b1, b2, b3, td, tmax)
c = zeros(size(t));
ind = (t > td) & (t < tmax);
c(ind) = (t(ind) - td) ./ (tmax - td) * (a1 + a2 + a3);
ind = (t >= tmax);
c(ind) = a1 * exp(-b1 * (t(ind) - tmax))+ a2 * exp(-b2 * (t(ind) - tmax)) + a3 * exp(-b3 * (t(ind) - tmax));
plot(t, c);
%plot(t,c_t);
hold all;
axis([-100 5000 -2000 80000]);
xlabel time ;
ylabel concentration ;
end
Now i would like to compute the convolution of the above function with following equation.
C_tot = ((k1*k2)/(k2+k3))*exp(-(k2+k3)*t) + (k1*k3)/(k2+k3)
where C_tot represents Output equation.
Basically i have to computed the Convolution of
C_tot and C(ind) at (t > td) & (t < tmax)
C_tot and C(ind) at (t >= tmax)
and plot the them accordingly, kindly let me know how shall i proceed this problem in matlab, the values K1,K2 K3 are user defined
来源:https://stackoverflow.com/questions/21819133/matlab-continuous-convolution-and-plotting