| Stateflow User's Guide | ![]() |
Options for Assigning Actions to Decisions in Truth Tables
In Assigning Truth Table Actions to Decisions, you assign actions to decisions in a truth table as part of programming a truth table. Stateflow allows you to be very creative in assigning actions. The following is a list of rules that apply to assigning actions to decisions in a truth table.
Actions for decisions are not optional. Each decision must have at least one action specifier that points to an action in the Action Table. If you want to specify no action for a decision, specify a row that contains no action statements.
For example, for the decision column D1 you can specify A1, A2, A3 or 1, 2, 3 to execute the first three actions if decision D1 is true.
In the following example, decisions D3 and D4 are assigned the actions in rows 3 and 4 of the Action Table, respectively.
Select row 4 in the Action Table and select the Move Row Up tool
to reverse rows 3 and 4, and notice the change in the action specifiers for columns D3 and D4, as shown.
| Debugging a Truth Table During Simulation | Truth Table Editor Operations | ![]() |
© 1994-2005 The MathWorks, Inc.