Separate strings w.r.t to semicolon

8 visualizzazioni (ultimi 30 giorni)
shaz
shaz il 23 Ott 2012
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 ;

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 23 Ott 2012
x={'a;b;c;d;f;e;g;t;y;s'}
y=regexp(x,';','split')
y{:}

Più risposte (1)

Sachin Ganjare
Sachin Ganjare il 23 Ott 2012
str = 'a;b;c;d;f;e;g;t;y;s';
Out = strread(str,'%s','delimiter',';');
Hope it helps!!!
  2 Commenti
Jan
Jan il 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.
Walter Roberson
Walter Roberson il 27 Nov 2012
Out = textscan(str, '%s', 'delimiter', ';');

Accedi per commentare.

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by