Main Content



Specifies the algorithm to detect zero crossings when a variable-step solver is used.

Category: Solver


Default: Nonadaptive


Use an improved zero-crossing algorithm which dynamically activates and deactivates zero-crossing bracketing. With this algorithm you can set a zero-crossing tolerance. See Signal threshold to learn how to set the zero-crossing tolerance.


Use the nonadaptive zero-crossing algorithm present in the Simulink® software prior to Version 7.0 (R2008a). This option detects zero-crossings accurately, but might cause longer simulation run times for systems with strong “chattering” or Zeno behavior.


  • The adaptive zero-crossing algorithm is especially useful in systems having strong “chattering”, or Zeno behavior. In such systems, this algorithm yields shorter simulation run times compared to the nonadaptive algorithm. See Zero-Crossing Detection for more information.


To enable this parameter, set the solver Type to Variable-step and set Zero-crossing control to either Use local settings or Enable all.

Selecting the Adaptive algorithm enables the Signal threshold parameter.

Programmatic Use

Parameter: ZeroCrossAlgorithm
Value: 'Nonadaptive' | 'Adaptive'
Default: 'Nonadaptive'

Recommended Settings

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Related Topics