Skip to content

blanks

Creating character array of white spaces

blanks(n)

  • n should be a non-negative integer scalar.
  • It returns a row vector of n white spaces.
  • It returns an empty array if n is 0.
  • If n is a character or logical value, it is first converted to its ASCII code.
  • n cannot be an empty array.

Example 1: Rows of white space characters, sandwiched by rows of alphabets.

['abcde';
blanks(5);
'fghij'
blanks(5);
'klmno']
ans =
abcde

fghij

klmno