how to conver a text to a matlab matrix or vector (every symbol in text fill one cell)

1 Ansicht (letzte 30 Tage)
p.e i have this in text: himynameis george and i want this: [h,i,m,y,n,a,m,e,i,s, ,g,e,o,r,g,e]
or the askii bits of every symbol in every cell
thenks

Akzeptierte Antwort

Image Analyst
Image Analyst am 7 Jan. 2013
Why do you want the complexity of a cell array when you have only one character per cell and a character array would work just fine?
characterArray = 'himynameis george'
asciiArray = int32(characterArray)

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 7 Jan. 2013
num2cell('himynameis george')

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by