How do I get an ODExx to return intermediate computed variables to the base workspace?

4 views (last 30 days)
Using any of the ODE solvers, I would like to pass out intermediate calculations that are computed by my ODE function to the base workspace for post analysis.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
There are a few ways to do this. If you want to pass out calculations that occur
on any of the time steps, successful or not, you may use Global variables or the function ASSIGNIN in your ODE function to pass the variables out to the base workspace.
If, however, you only want successful time step results, you may use the output function (outputFcn) in conjunction with ASSIGNIN or Global variables. You may need to recompute the calculations, however, in this method.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!