Apply the standard and user-defined solver options onto a MATLAB
ode() object.
Source: src/simulator/applySolverOptions.m
F = applySolverOptions(F, opt)
F = applySolverOptions(F, opt, defaults)applySolverOptions configures a MATLAB
ode() object under construction by merging three layers of
options, where later sources win:
AbsoluteTolerance = 1e-6,
RelativeTolerance = 1e-3). The solver is intentionally
not set here, as it is scheme-specific.defaults, e.g. the mss ODE scheme supplies
ode45 and the mdss DAE scheme
ode15i.opt.Both a legacy odeset struct (AbsTol,
RelTol, MaxStep, …) and a new
ode()-style struct (AbsoluteTolerance,
Solver, MaxOrder, …) are accepted; the
recognised aliases are resolved to the ode() property
names. Only non-empty values are applied, and unknown property names are
ignored.
The built-in standards set only the two tolerances; everything else
is left to the scheme defaults or the user opt
(and unset otherwise).
| Option | Built-in default |
|---|---|
AbsoluteTolerance |
1e-6 |
RelativeTolerance |
1e-3 |
Solver |
(none — supplied by the scheme defaults,
e.g. ode45 for mss, ode15i for
mdss) |
InitialStep, MaxStep,
MinStep, NormControl, OutputFcn,
OutputSelection, Vectorization,
MaxOrder |
(none — applied only if given in defaults or
opt) |
| Argument | Description |
|---|---|
F |
A MATLAB ode() object under construction. |
opt |
User solver options, overriding the defaults. May be empty
([]), a legacy odeset struct, or a new
ode()-style struct. |
defaults |
(optional) Scheme-specific standards,
e.g. struct('Solver',"ode45") for the mss ODE
scheme or struct('Solver',"ode15i") for the
mdss DAE scheme. |
| Output | Description |
|---|---|
F |
The ode() object with the resolved options
applied. |
msim · continuousTimeMdss
· discreteTimeMdss
MyToolbox Documentation | Generated automatically by CI/CD pipeline