| Stateflow® | ![]() |
Model_Handle = sfnew('-Chart_Type''Machine_Name')
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
Optional. |
'Machine_Name' | Name of the Stateflow machine (also becomes the model name). Optional. |
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.
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:

sfhelp, sfprint, sfroot, sfsave, stateflow
![]() | sflib | sfopen | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |