Truth Tables

Represent combinational logic for decision-making applications

Truth table functions implement combinatorial logic design in a concise, tabular format. Include a truth table inside a Stateflow® chart or add a Truth Table block directly to your Simulink® model.


Truth TableRepresent logical decision-making behavior with conditions, decisions, and actions


Reusable Functions in Charts

Specify function calls in states and transitions.

Reuse Combinatorial Logic by Defining Truth Tables

Express combinatorial logic in tabular form.

Truth Table Operations

Construct truth tables in the Stateflow Editor.

Language Options for Stateflow Truth Tables

Specify truth table conditions and actions by using MATLAB® or C syntax.

Program a Truth Table

Define the logical behavior of a truth table.

Debug Run-Time Errors in a Truth Table

Use breakpoints to debug truth tables.

Correct Overspecified and Underspecified Truth Tables

Run diagnostic checks to detect errors in truth table specification.

View Generated Content for Stateflow Truth Tables

Truth table logic is implemented as flow charts and MATLAB functions.

Map Fault Conditions to Actions by Using Truth Tables

Use truth tables to map fault conditions to their consequent actions.

Export Stateflow Functions for Reuse

Extend the scope of your functions to other blocks in a Simulink model.

Reuse Functions by Using Atomic Boxes

Encapsulate reusable functions in a separate namespace.

Featured Examples