convert string to cell

3 vues (au cours des 30 derniers jours)
shaz
shaz le 15 Nov 2012
i have a cell like
a = {'a;b;c;d;e;f;g;h'} % size is 1*1
how to place elements in to individual cell of a
output size = 1*8
  2 commentaires
Jan
Jan le 15 Nov 2012
The question is not unique: Do you want to get {'a', 'b', 'c'} or {'a;', 'b;', 'c;'}?
Jan
Jan le 27 Nov 2012
It would be friendly to answer questions for clarifications. Otherwise it seems, like you are not interested in your own answers. This will reduce the motivation of others to answer your questions.

Connectez-vous pour commenter.

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 15 Nov 2012
Modifié(e) : Azzi Abdelmalek le 15 Nov 2012
b=regexp(a,';','split')
b{:}

Plus de réponses (0)

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by