Stateflow User's Guide Previous page   Next Page

Calling a Graphical Function

Once you make a function, you call it from a transition condition or one of the actions of a state or transition. The function you added in Adding a Graphical Function returns the comparison value that you test for in the transition segment from the junction to the state Hi. Use the following steps to call the function hot in the condition of that transition segment:

  1. Click on the transition from the junction to the state Hi.
  2. Both the transition and its label become highlighted.
  3. Edit the label to be [hot()].
  4. Edit the label for the transition from state Hi to state Lo to be [!hot()], as shown.

  5. Save the model (SFcontrol4).

Previous page  Adding a Graphical Function Simulating with a Sensor Event, Junction, and Function Next page

© 1994-2005 The MathWorks, Inc.