Max step size
Maximum step size for variable-step solver
Model Configuration Pane: Solver
Specify the largest time step, in seconds, for the variable-step solver to take in simulation.
To enable this parameter, set the solver Type to
auto(default) | scalar
By default, the Max step size value is
auto, which indicates that the solver determines the maximum step size to use in the simulation. The way the solver determines the maximum step size depends on the type of variable-step solver selected.
When the Solver parameter value is
discrete (no continuous states), the solver uses the smallest sample time in the model as the maximum step size.
When the Solver parameter value is something other than
discrete (no continuous states), the maximum step size is determined based on the specified Start time and Stop time.
When the stop time is
infor is equal to the start time, the maximum step size is
For all other stop time values, the maximum step size is chosen such that the simulation has at least 50 time hits.
When your model includes a Sine Wave block or a Signal Generator block, the maximum step size is determined based on the highest specified frequency in the model . The software ensures that the maximum step size results in a sample rate larger than the Nyquist rate for all periodic signals in the model.
Generally, the solver determines an appropriate maximum step size. Consider specifying the maximum step size when:
You simulate the model over a large time span. For long time spans, the step size the solver chooses might be too large to find the solution.
Your model contains periodic or nearly periodic behavior, and you know the period. Specify the maximum step size to a fraction of the period, such as
You are concerned about the solver missing significant behavior when using the solver-determined maximum step size.
Selecting Enable decoupled continuous integration can allow the solver to determine a larger maximum step size when the Max step size parameter is set to
The table summarizes recommended values for this parameter based on considerations related to code generation.
|Safety precaution||No impact|
|Type: string | character vector|
|Value: numeric scalar|
Introduced before R2006a