Skip to Main Content Skip to Search
Product Documentation

What Is a Flow Graph?

A flow graph is a graphical construct that models logic patterns by using connective junctions and transitions. The junctions provide decision branches between alternate transition paths. You can use flow graphs to represent decision and iterative loop logic.

Here is an example of a flow graph that models simple if-else logic:

This flow graph models the following code:

if (u > 0)
{
   y = 1;
}
else
{
   y = 0;
}
  


Free Stateflow Interactive Kit

Learn how engineers use Stateflow to model state machines in their Simulink models.


Get free kit

Trials Available

Try the latest version of Stateflow.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS