Min step size

Description

Specify the smallest time step that the solver can take.

Category: Solver

Settings

Default: auto

  • The default value (auto) sets an unlimited number of warnings and a minimum step size on the order of machine precision.

  • You can specify either a real number greater than zero, or a two-element vector for which the first element is the minimum step size and the second element is the maximum number of minimum step size warnings before an error was issued.

Tips

  • If the solver takes a smaller step to meet error tolerances, it issues a warning indicating the current effective relative tolerance.

  • Setting the second element to zero results in an error the first time the solver must take a step smaller than the specified minimum. This is equivalent to changing the Min step size violation diagnostic to error on the Diagnostics pane (see Min step size violation).

  • Setting the second element to -1 results in an unlimited number of warnings. This is also the default if the input is a scalar.

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

Dependencies

This parameter is enabled only if the solver Type is set to Variable-step.

Command-Line Information

Parameter: MinStep
Type: character vector
Value: any valid value
Default: 'auto'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Related Topics