bvpget

Reads a named option from a boundary value problem options structure.

Category: Mathematics > Numerical Integration and Differential Equations

Syntax

val = bvpget(options, 'name')

Returns the value of the option, or [] if it is not set.

val = bvpget(options, 'name', default)

Returns default when the option is empty.

Description

The solvers use bvpget internally to read their settings, falling back on defaults. It is shorthand for accessing the field directly, with the added behavior of the default value.

Input arguments

options
Structure created by bvpset.
'name'
Option name, such as 'RelTol'.
default
Value to return if the option is empty.

Output arguments

val
The option value.

Example

Reading an option

opts = bvpset('RelTol', 1e-5);
bvpget(opts, 'RelTol')
bvpget(opts, 'AbsTol', 1e-8)
Output
ans = 1.0000e-05
ans = 1.0000e-08

See also

bvpset bvp4c odeget odeset