Faster than ODE45
19 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I would like to go faster than ode45 and ode 23 is there a way to change the input in:
[t,y]=ode23tb(@Gi,[0.000001;a],[1,0]);
so I could run my programs faster. I don't care if the precision drop a little bit. Thanks
0 commentaires
Réponse acceptée
Matt Tearle
le 16 Juin 2011
ode23tb is more efficient for cruder tolerances, so make sure you use odeset to set the tolerances appropriately. RelTol and AbsTol are the settings to look at. (The defaults are 1e-3 and 1e-6, respectively.)
Also, ode23tb is for stiff systems. I assume you've already established that this is the case. If not, ode23 will be more efficient (again, setting RelTol and/or AbsTol appropriately).
opts = odeset('AbsTol',1e-3);
[t,y]=ode23tb(@Gi,[0.000001;a],[1,0],opts);
Creates a structure opts that contains the option settings, then passes that into ode23tb.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Ordinary Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!