Contents

FOR Loops

This example shows the use of flow charts in a Stateflow® C chart to create C statements such as the FOR loop. This particular example shows how you can create a simple FOR Loop that defines an array variable. The equivalent statements in MATLAB® are as follows:

for i=1:10 output(i) = 2 * i; end

Was this topic helpful?