piecewise function in ODEs

6 ビュー (過去 30 日間)
Samuel Coeyman
Samuel Coeyman 2019 年 4 月 17 日
コメント済み: Star Strider 2019 年 4 月 17 日
Does anybody have experience using piecewise fxn inside of ODE solvers, such as ode23?
Thanks!
  1 件のコメント
Star Strider
Star Strider 2019 年 4 月 17 日
The best way to integrate a piecewise function is to integrate the first region, stop the solver, use the last values of the integration as the new initial conditions, then integrate the second region, and continue until you have integrated the entire function.
The reason is that the function may not be differentiable across the abrupt changes between the regions, giving unreliable results.

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

回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by