필터 지우기
필터 지우기

Separate strings w.r.t to semicolon

조회 수: 4 (최근 30일)
shaz
shaz 2012년 10월 23일
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일
x={'a;b;c;d;f;e;g;t;y;s'}
y=regexp(x,';','split')
y{:}

추가 답변 (1개)

Sachin Ganjare
Sachin Ganjare 2012년 10월 23일
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.
Walter Roberson
Walter Roberson 2012년 11월 27일
Out = textscan(str, '%s', 'delimiter', ';');

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by