String Data

Text-based values

Strings are pieces of textual data. Use strings in Stateflow® charts that use C as the action language to control chart behavior or create natural language output. Incorporate string data in your logging, messages, and custom code workflows.

Stateflow Syntax

expand all

ascii2strConvert array of type uint8 to string
str2asciiConvert string to array of type uint8
str2doubleConvert string to double precision value
strcatConcatenate strings
strcmpCompare strings
strcpyAssign string value
strlenDetermine length of string
substrExtract substring from string
tostringConvert numeric value to string


Manage Textual Information by Using Strings

Use text strings in C action language charts.

Log String Data to the Simulation Data Inspector

View text strings in the Simulation Data Inspector and in the MATLAB® workspace.

Send Messages with String Data

Communicate between charts by using messages with string payloads.

Featured Examples