Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

sfnew

Create model containing empty Stateflow block

Syntax

sfnew
sfnew('chart_type')
sfnew('model_name')
sfnew('chart_type','model_name')

Description

sfnew creates an untitled model with an empty chart. Stateflow® sets the default action language for new charts to MATLAB®. To change the default action language to C, use the command sfpref('ActionLanguage','C'). For more information, see Modify the Action Language for a Chart.

sfnew('chart_type') creates an untitled model that contains an empty block of type chart_type.

sfnew('model_name') creates a model called model_name with an empty chart with the default action language.

sfnew('chart_type','model_name') creates a model called model_name with an empty block of type chart_type.

Input Arguments

chart_type

Empty block to add to an empty model:

-MATLABUse a chart that supports MATLAB expressions in Stateflow actions
-CUse a chart that supports C expressions in Stateflow actions
-MealyUse a chart that supports only Mealy state machine semantics
-MooreUse a chart that supports only Moore state machine semantics
-TTUse a truth table
-STTUse a state transition table

model_name

Name of the model.

Examples

Create a untitled model with an empty chart that uses MATLAB as the action language:

sfnew()

Create a model called MyModel with an empty chart that uses only Mealy semantics:

sfnew('-Mealy','MyModel')

Create a model called MyModel with an empty chart that uses only Moore semantics:

sfnew('-Moore','MyModel')

Introduced before R2006a

Was this topic helpful?