writing ODE stats to a variable to use for plots.
2 views (last 30 days)
Show older comments
Hallo,
I am doing a study on the efficiency of using different algorithms to solve a number ODEs.
I have wrote every thing in to a loop but I still would like to know if there i sampile why to write out these outputs to variables that i would like to plot and compare: - number of step(correct and incorrect) - time the solver needs ( i am using tic toc, is there a better method?) - open for more ideas!
note: i have already done an error analysis. note 2: i know the efficiency is depended on many parameters but i would to know if there is a way to plot the internal values of a ODE solvers
thank you
3 Comments
Sara
on 29 Jan 2015
I don't agree with the second point: a fixed-step runge kutta (i.e., no erroneous steps) can be much less efficient than a variable-step one, especially if the function is smooth and the time step chosen by the user is very small. Efficiency is measured in time spent to complete the calculations on the same system, so cpu time is more than good as a parameter in my opinion.
To answer your last point, if to the solver you specify the time interval you're interested in instead of a time array, you'll get as output the times where the function was successfully computed, i.e., nice looking plots.
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!