|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OutputFcn — To specify an output function, set 'OutputFcn' to a function handle. For example,
options = odeset('OutputFcn',@myfun)
sets 'OutputFcn ' to @myfun, a handle to the function myfun.See "Function Handles" in the MATLAB Programming documentation for more information.
The output function must be of the form status = myfun(t,y,flag)
, in the MATLAB Mathematics documentation, explains how to provide additional parameters to myfun, ifnecessary.
The solver calls the specified output function with the following flags. Note that the syntax of the call differs with the flag. The function must respond appropriately:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The solver calls myfun(tspan ,y0,'init') beforebeginning the integration to allow the output function to initialize. tspan and y0 are the input arguments to the ODE solver.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|