| Stateflow User's Guide | ![]() |
Generating C Code for Targets
When you are finished with your model, you might want to use the control part of your model as a source for code that you use in the actual controller for an actual physical plant. In this case, you may want to take advantage of Stateflow code generation.
Stateflow generates code for targets. A target is an object that belongs to a Stateflow machine. A machine is a container for all the Stateflow blocks in a Simulink model. A target object functions as a container for the generated code from the Stateflow blocks in a Stateflow machine.
There are three types of targets for a Stateflow machine, which are described in the following topics:
| Watching Stateflow Execute During Simulation | Simulation Targets | ![]() |
© 1994-2005 The MathWorks, Inc.