Filter löschen
Filter löschen

split character strings into cell arrays without delimiter

4 Ansichten (letzte 30 Tage)
Sumara
Sumara am 21 Nov. 2023
Beantwortet: Voss am 21 Nov. 2023
I have a 10 x 100 character array that I would like to change into a 10 x 100 cell array.
e.g.
'AEADHF'
'TYESDF'
into
'A' 'E' 'A' 'D' 'H' 'F'
'T' 'Y' 'E' 'S' 'D' 'F'

Akzeptierte Antwort

Voss
Voss am 21 Nov. 2023
ch = ['AEADHF';'TYESDF']
ch = 2×6 char array
'AEADHF' 'TYESDF'
C = num2cell(ch)
C = 2×6 cell array
{'A'} {'E'} {'A'} {'D'} {'H'} {'F'} {'T'} {'Y'} {'E'} {'S'} {'D'} {'F'}

Weitere Antworten (0)

Kategorien

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

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by