This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Decision Logic

Control flow, combinatorial, and procedural logic for decision-making applications

Create combinatorial flow graphs to model common programming constructs such as if-else statements or while loops by using junctions and transitions. With truth tables, you can design your Stateflow® logic in a concise tabular format. MATLAB® functions implement more complicated algorithms in your Stateflow chart.


ChartImplement control logic with finite state machine
Truth TableRepresent logical decision-making behavior with conditions, decisions, and actions


Flow Charts in Stateflow

Defines and describes flow charts

Create Flow Charts with the Pattern Wizard

Describes how to create MAAB-compliant flow charts automatically with the Pattern Wizard

Enhance Readability of Code for Flow Charts (Embedded Coder)

Describes how to convert if-elseif-else code to switch-case statements to enhance readability of generated code

Connective Junctions

Describes decision points between alternative transition paths

What Is a Truth Table?

Describes the truth tables that Stateflow truth table functions implement

MATLAB Functions in a Chart

Short description of what this type of function is and what the typical applications are

How Chart Constructs Interact During Execution

Explains how different graphical and nongraphical constructs interact during chart execution

Build Model with Stateflow Truth Table

Shows you how to create a model that calls and executes a Stateflow chart with a truth table

Was this topic helpful?