ode45 failing but other solvers work fine
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Thomas Carr
il 16 Ott 2020
Commentato: Thomas Carr
il 19 Ott 2020
Hi. One particular computer the script below is givng an error using ode45. On other computers ode45 works just fine. On the computer with the problem substituting ode23, ode133, ode152, etc. all work fine. No other changes are made (all have the same call syntex), ie, simply changing "45" to "23" gives the error shown below. This is completely bizarre to me. Any ideas?
0 Commenti
Risposta accettata
Star Strider
il 16 Ott 2020
Run this from your Command Window or a script:
which ode45 -all
You should only get:
C:\Program Files\MATLAB\R2020b\toolbox\matlab\funfun\ode45.mC:\Program Files\MATLAB\R2020b\toolbox\matlab\funfun\ode45.m
I suspect you will get more than that, pointing to the problem.
0 Commenti
Più risposte (1)
Steven Lord
il 16 Ott 2020
Rename this file from ode45.m (which prevents you from calling the ode45 function included in MATLAB) to firstorderRK45.m. Don't just save it under the new name. You need to remove your ode45.m file entirely. [Leave the one in the toolbox\matlab\funfun directory under matlabroot alone.]
Vedere anche
Categorie
Scopri di più su Ordinary Differential Equations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!