| Contents | Index |
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;
}
![]() | Modeling Logic Patterns and Iterative Loops Using Flow Graphs | Difference Between Flow Graphs and State Charts | ![]() |

Learn how engineers use Stateflow to model state machines in their Simulink models.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |