how create cell array of blank space " "

 Akzeptierte Antwort

Voss
Voss am 5 Sep. 2023

0 Stimmen

Cell array:
C = repmat({' '},1,5)
C = 1×5 cell array
{' '} {' '} {' '} {' '} {' '}
or:
C = cell(1,5);
C(:) = {' '}
C = 1×5 cell array
{' '} {' '} {' '} {' '} {' '}
A string array may be useful too:
S = repmat(" ",1,5)
S = 1×5 string array
" " " " " " " " " "
or:
S = strings(1,5);
S(:) = " "
S = 1×5 string array
" " " " " " " " " "

Weitere Antworten (0)

Kategorien

Mehr zu Operators and Elementary Operations finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 5 Sep. 2023

Beantwortet:

am 5 Sep. 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by