Create character array of blanks
chr = blanks(n)
example
chr = blanks(n) returns a 1-by-n array of space characters.
n
1
collapse all
Create an array of five blanks. To display it, embed it in a character array that starts and ends with a visible character.
b = blanks(5); chr = ['|' b '|']
chr = '| |'
Embed the blanks in a string and display the string. Starting in R2017a, you can create strings using double quotes.
str = "Due Date:" + b + "2017-01-13"
str = "Due Date: 2017-01-13"
Number of space characters, specified as an integer.
If n is 0, then blanks returns a 1-by-0 character array.
0
blanks
If n is less than 0, then blanks treats it as 0.
Data Types: double | single | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
double
single
int8
int16
int32
int64
uint8
uint16
uint32
uint64
char | deblank | newline | pad | string | strip
char
deblank
newline
pad
string
strip
You have a modified version of this example. Do you want to open this example with your edits?