piecewise function in ODEs

조회 수: 8 (최근 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 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