Can the same matlab ode solver give different results for a problem that is highly nonlinear, but not stochastic?

5 visualizzazioni (ultimi 30 giorni)
I have been using matlab ode solvers to solve a system of two coupled, highly nonlinear system of ODEs. Earlier I was using ode15s to solve the problem and was getting different results every time I ran it. Note that, if I ran the same code within a gap of an hour or so, it often gave me same results (reproducible). But if there was a gap of like few hours or if I ran the code a day after, I got different results even with the same parameters. Checked it multiple times.
On checking ode15s help file, I found it had a varying accuracy from low to high. So, I changed the solver to ode45 and tightened it with tolerance options as:
options = odeset('AbsTol',1e-15,'RelTol',1e-12);
[t, r] = ode45('ode_problem', time_range, initial_conditions, options);
But even now the problem is there, though sometimes even after a day I do get lucky to get the same results (sometimes reproducible). So what could be going wrong? Sometimes the end results vary by more than two orders of magnitude. There is no stochastic or random component in my problem.
Or, is it possible that the nonlinear problem has come stochastic component attached to it, but not directly visible?

Risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by