Azzera filtri
Azzera filtri

how create cell array of blank space " "

2 visualizzazioni (ultimi 30 giorni)
pipor
pipor il 5 Set 2023
Risposto: Voss il 5 Set 2023
cell(1,5)
ans = 1×5 cell array
{0×0 double} {0×0 double} {0×0 double} {0×0 double} {0×0 double}

Risposta accettata

Voss
Voss il 5 Set 2023
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
" " " " " " " " " "

Più risposte (0)

Categorie

Scopri di più su Cell Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by