| Contents | Index |
Whether or not to enable zero-crossing detection on state transitions can be a trade-off between accuracy and performance. Generally when detecting zero crossings, a Simulink model accurately simulates mode changes without unduly reducing step size. However, for systems that exhibit chattering — frequent fluctuations between two modes of continuous operation — enabling zero-crossing detection may impact simulation time. Chattering requires a Simulink model to check for zero crossings in rapid succession, resulting in excessively small step sizes which can slow simulation. In these situations, you can disable zero-crossing detection, choose a different zero-crossing detection algorithm for your chart, or modify parameters that control the frequency of zero crossings in your Simulink model. See Preventing Excessive Zero Crossings in the Simulink User's Guide.
![]() | Configuring a Stateflow Chart to Update in Continuous Time | Defining Continuous-Time Variables | ![]() |

Learn how engineers use Stateflow to model state machines in their Simulink models.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |