Numerical weirdness with ode15s....

9 views (last 30 days)
Sylvia Sullivan
Sylvia Sullivan on 7 Apr 2016
Hi, I am having a very strange (at least to me) problem. I have a code which is iterating through time spans, and in each time span, it will solve a set of time-delay ODEs with dde23 and then a set of normal ODES with ode15s.
Now if I start a clean MATLAB window and run this code, it goes for about 15 minutes with no warnings about solver precision. Then I call clear all to delete all output and rerun the code in the same window to verify reproducibility. I now get "Warning: Failure at t=5E+00 (seconds). Unable to meet integration tolerances without reducing the step size below the smallest value allowed at time t." for ode15s. If I just let the warnings continue, the code produces output for about 75 minutes.
Does anybody have an explanation for this numerical weirdness? And then how I can avoid it and what output is trustworthy? Thanks very much, Sylvia

Answers (0)

Community Treasure Hunt

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

Start Hunting!