Odefun: how to modify an equation after a certain time

1 次查看(过去 30 天)
Hello,
As the title suggests, I would like to modify an equation in a system of differential equations after a specific time has passed. To be more clear: I have a time period of 14 days, so I define
dd = 1:14;
sol = ode23s(@des, [0 dd(end)], y0);
In the
des
system of differential equations, I want to maintain a certain equation until day 7, and then I want to replace it with a different equation from day 7 to 14.
Is it possible to implement such a procedure?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dynamic System Models 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by