piecewise function in ODEs

8 次查看(过去 30 天)
Samuel Coeyman
Samuel Coeyman 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 CenterFile Exchange 中查找有关 Numerical 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