ddeget
Reads a named option from a delay differential equation options structure.
Category: Mathematics > Numerical Integration and Differential Equations
Syntax
val = ddeget(options, 'name')
Returns the value of the option, or [] if it is not set.
val = ddeget(options, 'name', default)
Returns default when the option is empty.
Description
The delay solvers use ddeget to read their settings, applying defaults for options left empty. In your own code it is useful when writing a function that accepts an options structure and needs a fallback value.
Input arguments
options- Structure created by
ddeset. 'name'- Option name, such as
'RelTol'. default- Value to return if the option is empty.
Output arguments
val- The option value.
Example
Reading with a default
opts = ddeset('RelTol', 1e-5);
ddeget(opts, 'RelTol')
ddeget(opts, 'AbsTol', 1e-9)
Output
ans = 1.0000e-05
ans = 1.0000e-09