Structure a complex calculation in boxes rather than in states
Show older comments
A complex calculation is structured in small steps inside Stateflow states. As each of these states defines one timestep in simulation, the execution may be accelerated using boxes instead of states.
In this simple example, counters are incremented inside states and boxes, respectively. The states path increments by one per timestep (exept State3, which imitates the implementation of boxes and is highlighted yellow as "unreachable state"), the boxes path takes all incrementations in one single time step.
So, acceleration of calculations works as expected.
But is there more to consider in using boxes for strcuturing complex calculations? Might there occure problems when it comes to code generation?

Accepted Answer
More Answers (0)
Categories
Find more on Stateflow in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!