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

1 visualizzazione (ultimi 30 giorni)
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 Commento
Jan
Jan il 7 Mar 2015
Pleae explain, why you think that it "does not seem to allow me to set it that way".

Accedi per commentare.

Risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by