Guidelines for Naming Stateflow Objects - MATLAB & Simulink (original) (raw)

You can name Stateflow® objects with a combination of alphanumeric and underscore characters.

Note

Do not use the file names sf.slx for Simulink® models or sf.sfx for standalone Stateflow charts in MATLAB®. Using these file names can shadow Stateflow program files and result in unpredictable behavior.

Reserved Keywords

Usage in Action Language Syntax Keywords Syntax References
Change detection hasChangedhasChangedFromhasChangedTochangechg Detect Changes in Data and Expression Values
Complex data compleximagreal Operations for Complex Data in Stateflow
Data type operations casttype Type Cast Operations Specify Scope and Type of Stateflow Data
Data types booleandoubleint8int16int32int64singleuint8uint16uint32uint64 Specify Scope and Type of Stateflow Data
Edge detection crossingfallingrising Detect Changes in Data and Expression Values
Events sendtick Broadcast Local Events to Synchronize Parallel StatesControl Chart Behavior by Using Implicit Events
Interface with MATLAB code matlabmlthis Access MATLAB Functions and Workspace Data in C ChartsModel a Power Window ControllerSimulate a Media Player
Literal symbols falseinfttrue Supported Symbols in Actions
Messages discardforwardisvalidlengthreceivesend Control Message Activity in Stateflow Charts
State actions bindduduringenentryexexiton Represent Operating Modes by Using States
State activity enterenexitexin Check State Activity by Using the in Operator
String manipulation ascii2strstr2asciistr2doublestrcatstrcmpstrcpystrlensubstrtostring Manage Textual Information by Using Strings NoteThese operator names are reserved keywords only in charts that use C as the action language.
Temporal logic afteratbeforecountdurationelapsedeteverymsecsectemporalCountusec Control Chart Execution by Using Temporal Logic
Test model simulation verify (Simulink Test) assert (Simulink Test) Verify Model Simulation by Using when Decomposition (Simulink Test) NoteThe verify operator requires Simulink Test™.

See Also

Topics