MATLAB Answers


Fix the maximum number of iterations while using ode solvers

Asked by Deepa Maheshvare on 5 Mar 2019
Latest activity Edited by Torsten
on 5 Mar 2019
Could someone let me know to fix the maximum number of ierations while solving a set of differential equation using ode15s?
I couldn't find which flag has to be selected in the 'options' .


Sign in to comment.


1 Answer

Answer by Torsten
on 5 Mar 2019
 Accepted Answer


Hi ,
I had a look at the odeset function given here .
From the link that has been shared above, I could understand OutputFcn:
has to be altered. I couldn't understand how it has to be set.
Could you please explain?
I couldn't open web([docroot,'/techdoc/ref/odeset.html']). from command prompt.
It shows page not found.
The file to use is included in the link given (odeRun.m).
Why don't you just take it and modify the numbers 100 and 25 in the line
if numMajorTimeStep > 100 || numDiffEqEval > 25
according to your needs ?

Sign in to comment.