필터 지우기
필터 지우기

split character strings into cell arrays without delimiter

조회 수: 4 (최근 30일)
Sumara
Sumara 2023년 11월 21일
답변: Voss 2023년 11월 21일
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'

채택된 답변

Voss
Voss 2023년 11월 21일
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'}

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by