フィルターのクリア

solving nonlinear ode for a set period

3 ビュー (過去 30 日間)
Abraham Bloxham
Abraham Bloxham 2021 年 2 月 7 日
回答済み: Star Strider 2021 年 2 月 8 日
hi all,
I am solving a set of ODE (non-linear) here is first (this one is linear but i need to solve this concept before moving on).
f2 = @(t,X) [a*X(1)];
a is a number.
[t,y] = ode45(f2,[0 : t],[1]);
how can i set up the code so that the it stops at time t when a certain value in y has been reached. Then a new ODE comes into play.
thanks everyone - much appreciated.

採用された回答

Star Strider
Star Strider 2021 年 2 月 8 日
See the documentation section on ODE Event Location.

その他の回答 (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