Main Content

blanks

Create a character array of blanks

Description

example

blnkspace = string(blanks(n)) returns a 1-by-n array of space characters. Character arrays are not supported in Stateflow®, but they can be used in combination with the string operator to create a string type value.

Note

The operator blanks is supported only in Stateflow charts that use MATLAB® as the action language.

Examples

expand all

Return a 1-by-3 blank array.

m = string(blanks(3))
h = "Hello"
w = "world!"
hw = h + w
hmw = h + m + w

Stateflow chart that uses the blanks operator in a state.

Results from stateflow chart that uses the blanks operator in a state.

Introduced in R2021b