str2cell: a pedestrian cell creator

버전 1.0.0.0 (1.72 KB) 작성자: us
creates a cell array from an input vector of any valid ML datatype
다운로드 수: 9.3K
업데이트 날짜: 2005/6/7

라이선스 보기

help str2cell

c = str2cell(v)
c = str2cell(v,delim[s])

creates a cell array C from input vector V.
places segments of V seperated by delimiter
DELIM into separate cells of C.

see also: CELLSTR

v : a string/vector of a ML supported data class
delim : array of delimiter[s] [def: isspace]
v-class syntax
----------------------
char 'xyz'
other [1 2 pi]

note:
an input matrix (NxM) will be turned into a
1x(N*M) column vector WITHOUT warning!

examples:
s='this is a ;;; test string; +-0 ;;;_;;; for; +;+ fun;';
c=str2cell(s,' +-;0_')
'this'
'is'
'a'
'test'
'string'
'for'
'fun'

d=[pi pi 1 2 inf 4 5 6 nan 78 pi];
c=str2cell(d,[nan pi 5 inf])
[1x2 double] % = 1 2
[ 4]
[ 6]
[ 78]

인용 양식

us (2024). str2cell: a pedestrian cell creator (https://www.mathworks.com/matlabcentral/fileexchange/4247-str2cell-a-pedestrian-cell-creator), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Data Type Conversion에 대해 자세히 알아보기
도움

줌: char2cell

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

finally, after 5 years, added a missing ; at the end of line 62... sorry for the delay