How to change values during the solving ode
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I want to know how I can change the value of a vector during the integration. For instance, every 5 minutes, add 3 to y(2)...
I found a solution for t==t1 : use events in the ode options (see the file test_ball.m the name comes from ballode.m) but if I want to do the same for 5, 10, 15 etc it doesn't work... I changed value = t -5 in mod(t,5) and in (t>0 && mod(t,5)==0)-1 without success.
Thanks and sorry for the mistakes.
Ccile
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Ordinary Differential Equations 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!