Borrar filtros
Borrar filtros

How to change values during the solving ode

2 visualizaciones (últimos 30 días)
Cécile Moulin
Cécile Moulin el 19 de Oct. de 2016
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

Respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by