Changing ode solver tolerances on the fly
Show older comments
I am trying to solve a set of coupled stiff ode's using the ode45/ode15s solvers. The solver sometimes does not converge and exists with an error for a particluar set of "Absolute tolerance", Relative Tolerance". Is it possible to change (relax) the values of the "Absolute tolerance", Relative Tolerance" on the fly just for the "problem" time step, help it cross over, and then switch back to the original values.
Thank you
Accepted Answer
More Answers (1)
Torsten
on 27 Oct 2023
1 vote
Is it possible to change (relax) the values of the "Absolute tolerance", Relative Tolerance" on the fly just for the "problem" time step, help it cross over, and then switch back to the original values.
No, the stepsizes cannot be changed during the integration. Make a second run with relaxed tolerances to see if it really matters. If there is a problem with your equations, the solver will usually abort integration also for larger tolerances.
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!