Stateflow User's Guide Previous page   Next Page

Creating a Stateflow Truth Table

You create a Simulink model in Creating a Simulink Model that contains a Stateflow block. Now you need to open the Stateflow diagram for the block and specify a truth table for it in the following steps:

  1. In the Simulink model, double-click the Stateflow block named Chart.
  1. An empty Stateflow diagram editor appears.

  1. In the Stateflow diagram editor, select the Truth Table drawing tool .
  2. Move the cursor into the empty diagram area and notice that the cursor takes on the shape of a box.
  3. Click to place a new truth table as shown.

  1. A shaded box appears with the title truthtable and a flashing text cursor in the middle of the box.

  1. Enter the label text
  1. and click outside the truth table box.

  1. The signature label you enter for the truth table defines its name (ttable), its arguments (x, y, and z), and its return value (t). Argument and return values can each be a scalar value or a matrix of values. Multiple return values are not allowed.


Previous page  Creating a Simulink Model Calling a Truth Table in a Stateflow Action Next page

© 1994-2005 The MathWorks, Inc.