options = nelson.ode.Options.makeSolverOptions(solver)
options = nelson.ode.Options.makeSolverOptions(solver, name, value)
tf = isDefault(options)
s = struct(options)
nelson.ode.Options is the base class of all nelson.ode.options.* classes used by the SolverOptions property of the ode object workflow. It is not meant to be instantiated directly; use one of its subclasses or the static factory method makeSolverOptions.
| Member | Kind | Purpose |
|---|---|---|
| makeSolverOptions | static method | Creates the options subclass matching a solver name. |
| isDefault | method | Returns true when every public option keeps its default value. |
| struct | method | Converts the options object to an option structure. |
| Refine | hidden property | Output refinement factor, a positive integer scalar (default empty, meaning the solver default). |
| ID | hidden property | Solver identifier stored in the option structure (default 'ode45'). |
| DefaultRefine | hidden property | Refinement factor used when Refine is empty (default 1). |
makeSolverOptions(solver, name, value, ...) returns an instance of the options subclass matching solver and forwards the name-value pairs to its constructor. Accepted solver names are 'ode45', 'ode23', 'ode78', 'ode89', 'ode113', 'ode15s', 'ode23s', 'ode23t', 'ode23tb', 'ode15i', 'autoswitch', 'cvodesnonstiff', 'cvodesstiff', and 'idas'. Any other name raises an error. 'autoswitch' and 'cvodesnonstiff' both map to nelson.ode.options.CVODESNonstiff.
isDefault(options) returns true when all the public properties of the options object still hold their default values.
struct(options) returns an option structure with the same field names as odeset, filled from the public properties of the options object, plus the ID field and the resolved Refine value.
options = nelson.ode.Options.makeSolverOptions('ode15s', 'MaxStep', 0.5);
class(options)
isDefault(options)
s = struct(options);
s.ID
s.MaxStep
| Version | Description |
|---|---|
| 2.0.0 | initial version |