Separate strings w.r.t to semicolon

i have a string like below in one cell(one row & one column)
a;b;c;d;f;e;g;t;y;s
i would like to separate in to individual cells with reference as ;

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2012년 10월 23일

1 개 추천

x={'a;b;c;d;f;e;g;t;y;s'}
y=regexp(x,';','split')
y{:}

추가 답변 (1개)

Sachin Ganjare
Sachin Ganjare 2012년 10월 23일

0 개 추천

str = 'a;b;c;d;f;e;g;t;y;s';
Out = strread(str,'%s','delimiter',';');
Hope it helps!!!

댓글 수: 2

Jan
Jan 2012년 11월 27일
Unfortunately STRREAD is deprecated and will vanish in a future Matlab release. I cannot imagine, why removing such important functions is helpful for anything.
Out = textscan(str, '%s', 'delimiter', ';');

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

질문:

2012년 10월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by