Specify the largest time step that the solver can take.
Category: Solver
Default:
auto
For the discrete solver, the default value
(auto
) is the model's shortest sample
time.
For continuous solvers, the default value
(auto
) is determined from the start and
stop times. If the stop time equals the start time or is
inf
, Simulink® chooses 0.2
seconds as the
maximum step size. Otherwise, it sets the maximum step size to
For Sine and Signal Generator source blocks, Simulink calculates the max step size using this heuristic:
where is the maximum frequency (Hz) of these blocks in the model.
Generally, the default maximum step size is sufficient. If you are concerned about the solver missing significant behavior, change the parameter to prevent the solver from taking too large a step.
Max step size determines the step size of the variable-step solver.
If the time span of the simulation is very long, the default step size might be too large for the solver to find the solution.
If your model contains periodic or nearly periodic behavior and you know the period, set the maximum step size to some fraction (such as 1/4) of that period.
In general, for more output points, change the refine factor, not the maximum step size.
This parameter is enabled only if the solver Type is set to Variable-step
.
Parameter:
MaxStep |
Type: character vector |
Value: any valid value |
Default:
'auto' |
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | No impact |