Main Content

Min step size

Minimum step size for variable-step solver

Model Configuration Pane: Solver

Description

Specify the smallest time step, in seconds, for the variable-step solver to take in simulation.

Dependencies

To enable this parameter, set the solver Type to Variable-step.

Settings

auto (default) | positive scalar number

By default, the Min step size parameter value is auto, and the software determines a minimum step size on the order of machine precision.

When you specify the minimum step size as auto or as a positive scalar number, the software allows the solver to take an unlimited number of steps of the specified size.

Tips

  • To specify how many times the software allows the solver to take a step of the specified size before issuing a diagnostic, use the Number of consecutive min steps parameter.

  • To specify the diagnostic behavior when the solver exceeds the number of specified minimum-sized steps, use the Min step size violation parameter.

  • When the solver needs to take a smaller step to meet error tolerances, the software issues a warning that indicates the current effective relative tolerance.

  • The Min step size parameter determines the step size of the variable-step ODE solver. The size is limited by the smallest discrete sample time in the model.

Recommended Settings

The table summarizes recommended values for this parameter based on considerations related to code generation.

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: MinStep
Type: string | character vector
Value: 'auto' | positive scalar number
Default: 'auto'

Version History

Introduced before R2006a