How to split a String ?

16 vues (au cours des 30 derniers jours)
sujayandra vaddagiri
sujayandra vaddagiri le 19 Juin 2013
Hi ,
I have a string 2-1 . I want to split this into Two different strings 2 and 1.
Can someone please throw some light on how to use the split string function.
Thanks in Advance.
  2 commentaires
sujayandra vaddagiri
sujayandra vaddagiri le 19 Juin 2013
oops..... just got it
s2 = regexp(string, '-', 'split')
the cyclist
the cyclist le 19 Juin 2013
You should put this comment as an answer below, and then accept that answer. That will help people looking for similar solutions later.

Connectez-vous pour commenter.

Réponse acceptée

sujayandra vaddagiri
sujayandra vaddagiri le 26 Mai 2014
s2 = regexp(string, '-', 'split')

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