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

1 回表示 (過去 30 日間)
Maxxy
Maxxy 2015 年 3 月 7 日
コメント済み: Jan 2015 年 3 月 7 日
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 件のコメント
Jan
Jan 2015 年 3 月 7 日
Pleae explain, why you think that it "does not seem to allow me to set it that way".

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by