How to stop integration by ODE after the first time step?

4 visualizaciones (últimos 30 días)
Maxxy
Maxxy el 7 de Mzo. de 2015
Comentada: Jan el 7 de Mzo. de 2015
Hi,
Does anyone know how to stop the integration by ode45 after the very first time step?
I tried using the odeset and events functions, egs:
function [value,isterminal,direction] = events1(t,T))
but when I got to the step where I needed to define 'value' in the events function, I got stuck. I wanted to use this to stop the integration (by setting isTerminal to 1) on the condition that T is positive, but the parameter 'value' does not seem to allow me to set it that way.
Please advise.
Thanks
  1 comentario
Jan
Jan el 7 de Mzo. de 2015
Pleae explain, why you think that it "does not seem to allow me to set it that way".

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by