split character strings into cell arrays without delimiter

4 views (last 30 days)
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'

Accepted Answer

Voss
Voss on 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'}

More Answers (0)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!