Quote:
Originally Posted by Ether
That matches my results out to the number of decimal places shown, except I'm getting a 6 instead of a 5 in the fourth decimal place of the Y value
|
I re-ran my script once for each of
MATLAB's ODE solvers, adjusting the tolerances as necessary to get a reasonable solve time.
Every solver agreed through the fifth decimal place (for the Y value). The stiff solvers needed significantly larger error tolerances and took more steps; their predicted error was much higher.
The nonstiff solvers all agreed through the seventh decimal place.
The lowest predicted error was obtained through the ode113 solver, using a relative tolerance of 100 * epsilon and an absolute tolerance of 10^-12. According to my error estimate, all of the following digits are correct:
It was interesting going through all the solvers -- many of the stiff solvers had error estimates in excess of 10^-4. I guess this shows that the choice of solver really can have an effect on the error, and not just the solution time.