Faster than ODE45
15 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Matt Tearle
on 16 Jun 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 Comments
More Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!