time | Calls | line |
---|
| | 1 | function b = blanks(n)
|
| | 2 | %BLANKS Character vector of blanks
|
| | 3 | % BLANKS(n) returns a character vector of n blanks.
|
| | 4 | % Use with DISP, e.g. DISP(['xxx' BLANKS(20) 'yyy']).
|
| | 5 | % DISP(BLANKS(n)') moves the cursor down n lines.
|
| | 6 | %
|
| | 7 | % See also NEWLINE, DEBLANK, PAD, STRIP, STRING, CHAR.
|
| | 8 |
|
| | 9 | % Copyright 1984-2018 The MathWorks, Inc.
|
| | 10 |
|
< 0.001 | 6 | 11 | if (isnumeric(n) || islogical(n)) && isempty(n)
|
| | 12 | n = 0;
|
< 0.001 | 6 | 13 | elseif ~isscalar(n)
|
| | 14 | error(message("MATLAB:NonScalarInput"))
|
< 0.001 | 6 | 15 | end
|
| | 16 |
|
< 0.001 | 6 | 17 | b = repmat(' ', 1, n);
|
Other subfunctions in this file are not included in this listing.