Faster than ODE45
21 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Matt Tearle
il 16 Giu 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 Commenti
Più risposte (0)
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!