Open a new figure window and plot the first result from the variable y that is of type double column vector over the second and the third result from the variable y 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 the "Lorenz attractor" and display the results while solving in a 3D plane
function vyd = florenz (vt, vx) vyd = [10 * (vx(2) - vx(1)); vx(1) * (28 - vx(3)); vx(1) * vx(2) - 8/3 * vx(3)]; endfunction vopt = odeset ('OutputFcn', @odephas3); vsol = ode23 (@florenz, [0:0.01:7.5], [3 15 1], vopt);