| Stateflow User's Guide |
 |
Building a Simulink Model with a Stateflow Truth Table
Truth tables are a special Stateflow function that you program with logical behavior. You implement truth tables by specifying action language conditions, decisions, and actions. In this section, you learn how to create truth tables in Stateflow by building a simple model with a truth table in the following topic steps:
- What Is a Truth Table? -- Describes the truth table concept using an example truth table that you create in Building a Simulink Model with a Stateflow Truth Table.
- Creating a Simulink Model -- Starts by creating a model that executes a Stateflow block.
- Creating a Stateflow Truth Table -- Creates a Stateflow diagram with a truth table for the Stateflow block.
- Calling a Truth Table in a Stateflow Action -- Adds a flow diagram to the Stateflow diagram that calls the truth table.
- Creating Truth Table Data in Stateflow and Simulink -- Shows you how to create the data in Stateflow and Simulink that the truth table changes during execution.
Once you build a model in this section, finish it by programming the truth table with its behavior in Programming a Truth Table.
| Note
The Stateflow diagram you create in this section contains the least amount of Stateflow programming possible. This might appeal to Simulink users who know little about Stateflow but want to use it to execute a truth table function.
|
| What Is a Truth Table? | | Creating a Simulink Model |  |
© 1994-2005 The MathWorks, Inc.