Main Content

Number of consecutive min steps

Number of minimum step size violations allowed before issuing diagnostic

Model Configuration Pane: Solver


A minimum step size violation occurs when the solver takes a step that is smaller than the value you specify for the Min step size parameter. Use this parameter to specify how many consecutive minimum time step violations can occur in simulation before the software issues a warning or error message.

To specify whether exceeding the number of consecutive steps results in a warning or an error message, use the Min step size violation parameter.


To enable this parameter:

  • Set the solver Type to Variable-step.

  • Set the Solver parameter to a value other than discrete (no continuous states).


1 (default) | positive scalar integer

By default, the software issues a diagnostic when the first minimum step size violation occurs. To allow more steps smaller than the specified minimum to occur, specify a larger number as a positive scalar integer value.

Recommended Settings

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

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: MaxConsecutiveMinStep
Type: string | character vector
Value: positive scalar integer
Default: '1'

Version History

Introduced before R2006a