Stateflow Previous page   Next Page

Create a Simulink Model

Opening the Stateflow model window is the first step toward creating a Simulink model with a Stateflow block. By default, an untitled Simulink model with an untitled, empty Stateflow block is created for you when you open the Stateflow model window. You can either start with the default empty model or copy the untitled Stateflow block into any Simulink model to include a Stateflow diagram in an existing Simulink model.

The following steps describe how to create a Simulink model with a Stateflow block, label the Stateflow block, and save the model:

  1. At the MATLAB prompt enter sfnew.

  1. Stateflow displays the following untitled Simulink model window with an untitled Stateflow block.

  1. Label the Stateflow block in the new untitled model by clicking in the text area and replacing the text Untitled with the text On_Off.

  2. Save the model by choosing Save As from the File menu of the Simulink model window and entering a model title.


Previous page  Build a Stateflow Model Create a Stateflow Diagram Next page

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS