Stateflow User's Guide Previous page   Next Page

Introducing Stateflow Semantics

The behavior applied to the outgoing transition from a junction in the example in Simulating Junction Behavior also applies to states. For outgoing transitions of equal validity from a state or a junction, Stateflow makes the decision based on clock position.

Stateflow follows a rule like this to make sure your Stateflow diagrams are deterministic. If Stateflow does not have this kind of rule, it could get stuck determining the right thing to do. Instead, Stateflow has a set of rules called semantics that it uses to make sure your model always runs and never gets stuck.

Here are some of the semantics that you have learned in this Getting Started guide to this point:

Stateflow has other semantics to make your diagrams behave deterministically. This subject is dealt with in much greater detail in the "Stateflow Semantics" chapter of Stateflow documentation. This is a good place to go to further your education on Stateflow after you have completed this Getting Started guide.


Previous page  Simulating Junction Behavior Using Junctions in Flow Diagrams Next page

© 1994-2005 The MathWorks, Inc.