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 ;

 Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 23 Okt. 2012

1 Stimme

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

Weitere Antworten (1)

Sachin Ganjare
Sachin Ganjare am 23 Okt. 2012

0 Stimmen

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

2 Kommentare

Jan
Jan am 27 Nov. 2012
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', ';');

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by