ddeset
Creates or updates the options structure used by the delay equation solvers.
Category: Mathematics > Numerical Integration and Differential Equations
Syntax
options = ddeset('name1', value1, 'name2', value2, ...)
Returns a structure with the given options set.
options = ddeset(oldopts, 'name', value)
Copies oldopts and changes the listed options.
Description
Option names are matched without regard to case, and options you do not set remain empty so the solver uses its default. Starting from oldopts is a convenient way to change a single setting.
Input arguments
'RelTol'- Relative error tolerance. Default
1e-3. 'AbsTol'- Absolute error tolerance. Default
1e-6. 'Events'- Handle of an event function that can stop the integration.
'MaxStep'- Upper bound for the step size.
Output arguments
options- Options structure to pass as the last argument of
dde23,ddesdorddensd.
Example
Setting tolerances
opts = ddeset('RelTol', 1e-6, 'AbsTol', 1e-9);
sol = dde23(@(t, y, Z) -Z, 1, 1, [0 2], opts);
fprintf('%.5f\n', sol.y(end))
Output
-0.50000