Main Content

blanks

Character array of spaces

Since R2021b

Syntax

Description

example

blanks(n) creates a 1-by-n array of space characters. Use the return value in combination with the string operator to create a string of n spaces.

Note

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

Examples

expand all

Create string that contains five spaces.

str = string(blanks(5));

Stateflow chart that uses the blanks operator in a state.

Version History

Introduced in R2021b