sfnew - Create a Simulink® model containing an empty Stateflow® block

Syntax

Model_Handle = sfnew('-Chart_Type''Machine_Name')

Arguments

Model_Handle

Handle to the new Simulink model that will contain the Stateflow block.

Chart_Type

Type of Stateflow block to add to the Simulink model. Enter

  • '-Classic' for a chart that implements full Stateflow chart semantics (default)

  • '-Mealy' for a chart that implements Mealy state machine semantics

  • '-Moore' for a chart that implements Moore state machine semantics

  • '-TT' for a truth table

Optional.

'Machine_Name'

Name of the Stateflow machine (also becomes the model name). Optional.

Description

Model_Handle = sfnew('-Chart_Type''Machine_Name') returns the handle to a new model named Machine_Name that contains an empty Stateflow block of type Chart_Type, and opens the new model on your desktop. If Chart_Type is not specified, the default block is Classic. If Machine_Name is not specified, the default name is untitled.

Examples

Create a Simulink model called MyModel that contains an empty Stateflow truth table.

m = sfnew('-TT', 'MyModel')

The new model looks like this:

Create an untitled Simulink model that contains an empty Stateflow chart.

m = sfnew

The new model looks like this:

See Also

sfhelp, sfprint, sfroot, sfsave, stateflow

  


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