Open a new figure window and plot the results from the variable y of type column vector over time while solving. The types and the values of the input parameter t and the output parameter ret depend on the input value flag that is of type string. If flag is
"init"- then t must be a double column vector of length 2 with the first and the last time step and nothing is returned from this function,
""- then t must be a double scalar specifying the actual time step and the return value is false (resp. value 0) for 'not stop solving',
"done"- then t must be a double scalar specifying the last time step and nothing is returned from this function.
This function is called by a OdePkg solver function if it was specified in an OdePkg options structure with the odeset. This function is an OdePkg internal helper function therefore it should never be necessary that this function is called directly by a user. There is only little error detection implemented in this function file to achieve the highest performance.
For example, solve an anonymous implementation of the "Van der Pol" equation and display the results while solving
fvdb = @(vt,vy) [vy(2); (1 - vy(1)^2) * vy(2) - vy(1)]; vopt = odeset ('OutputFcn', @odeplot, 'RelTol', 1e-6); vsol = ode45 (fvdb, [0 20], [2 0], vopt);