why the time "t" inside the ode solver OutputFcn is not a scalar?
2 views (last 30 days)
Show older comments
Ehsan Asadi on 18 Dec 2014
Edited: Geoff Hayes on 20 Dec 2014
For an ODE problem that I have, I need to evaluate some values right after each successful ODE step. therefore I decided to use OutputFcn (output function that is supposed to run only successful steps). I wrote a code and here is its summay:
where the OutputFcn is:
function status = My_OutputFcn(t,y,flag,varargin)
but the problem is that in the above method, sometimes the parameter t (time) is a vector rather than being a scalar. Why is that happening and how to fix it?
I am printing "t" in the middle of My_OutputFcn and here is a copy of the command window:
Any help would be greatly appreciated.
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!