piecewise function in ODEs

6 vues (au cours des 30 derniers jours)
Samuel Coeyman
Samuel Coeyman le 17 Avr 2019
Commenté : Star Strider le 17 Avr 2019
Does anybody have experience using piecewise fxn inside of ODE solvers, such as ode23?
Thanks!
  1 commentaire
Star Strider
Star Strider le 17 Avr 2019
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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Numerical Integration and Differential Equations dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by