string - Convert value to string in Stateflow chart - MATLAB (original) (raw)
Main Content
Convert value to string in Stateflow chart
Since R2021b
Syntax
Description
`str` = string(`X`)
converts the input X
to a string.
Note
The operator string
is not supported in Stateflow® charts that use C as the action language. For similar functionality, usetostring.
Examples
Convert integer scalar to string "1307"
.
Convert Boolean value to string "true"
.
Create string that contains five spaces.
Input Arguments
Input value, specified as an integer scalar, Boolean scalar, or character array. To create a character array of spaces, use the operator blanks.
Example: str = string(1307)
Example: str = string(true)
Example: str = string(blanks(n))
Version History
Introduced in R2021b