how do i change StepTolerance?

4 views (last 30 days)
Please i would like to write a code in matlab that changes the StepTolerance to 1E-20 but i do not know how to go about.
Please can someone assist, please..
This is my script:
tSpan=[0 535];
options = optimoptions('StepTolerance', 1e-20);
[tSol, ySol]=ode23tb(@(t, y) MBBRFun4(t,y), tSpan, y0, options);
as it stands, i get the following error:
Warning: Failure at t=6.848966e-01. Unable to meet integration
tolerances without reducing the step size below the smallest value
allowed (2.433242e-15) at time t.
Thanks in advance

Accepted Answer

Dinesh Yadav
Dinesh Yadav on 29 Oct 2019
As I have attached an example code for changing step tolerance. Hope it helps your cause.

More Answers (0)


Find more on Programming 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!