ODE use : how to integrate a very short action in the model ?
显示 更早的评论
Hello,
I am not new to Matlab : I was using it for year but some time ago (it was version 4). I am back with the last version : I am impress by the new possibility of this software.
But that not the purpose of my question !
I have the following kinetic model
function dc = Modele( t, c )
%MODELE Summary of this function goes here
% Detailed explanation goes here
r = 0.1 * c(1);
dc(1) = -r;
dc(2) = r;
dc = dc';
end
Which is integrated with this code :
c0 = [100, 0, 0.002, 5, 0, 0,0];
tspan = [0, 20];
ode = @(t,c)Modele(t,c);
[t,y] = ode45(ode, tspan, c0);
That perfect for a continuous process. I am able to perform action occurring during a time laps, for example addition of one reagent during one hour.
But how can I perform additions which are done at precise moment like addition of 1 gramme of a catalyst at 1, 2, 5 hours ?
I am expecting to be clear enough...
Jean-Marie
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Chemistry 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!