Odefun: how to modify an equation after a certain time

1 visualización (últimos 30 días)
Vittorio
Vittorio el 21 de Abr. de 2015
Editada: Vittorio el 21 de Abr. de 2015
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?

Respuestas (0)

Categorías

Más información sobre Dynamic System Models en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by