Separate strings w.r.t to semicolon

9 次查看(过去 30 天)
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.

请先登录,再进行评论。

类别

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