This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Zero-crossing control


Enables zero-crossing detection during variable-step simulation of the model. For most models, this speeds up simulation by enabling the solver to take larger time steps.

Category: Solver


Default: Use local settings

Use local settings

Specifies that zero-crossing detection be enabled on a block-by-block basis. For a list of applicable blocks, see Simulation Phases in Dynamic Systems

To specify zero-crossing detection for one of these blocks, open the block's parameter dialog box and select the Enable zero-crossing detection option.

Enable all

Enables zero-crossing detection for all blocks in the model.

Disable all

Disables zero-crossing detection for all blocks in the model.


  • For most models, enabling zero-crossing detection speeds up simulation by allowing the solver to take larger time steps.

  • If a model has extreme dynamic changes, disabling this option can speed up the simulation but can also decrease the accuracy of simulation results. SeeZero-Crossing Detection for more information.

  • Selecting Enable all or Disable all overrides the local zero-crossing detection setting for individual blocks.


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

Selecting either Use local settings or Enable all enables the following parameters:

  • Time tolerance

  • Number of consecutive zero crossings

  • Algorithm

Command-Line Information

Parameter: ZeroCrossControl
Value: 'UseLocalSettings' | 'EnableAll' | 'DisableAll'
Default: 'UseLocalSettings'

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Related Topics