How to split a String ?

16 visualizzazioni (ultimi 30 giorni)
sujayandra vaddagiri
sujayandra vaddagiri il 19 Giu 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 Commenti
sujayandra vaddagiri
sujayandra vaddagiri il 19 Giu 2013
oops..... just got it
s2 = regexp(string, '-', 'split')
the cyclist
the cyclist il 19 Giu 2013
You should put this comment as an answer below, and then accept that answer. That will help people looking for similar solutions later.

Accedi per commentare.

Risposta accettata

sujayandra vaddagiri
sujayandra vaddagiri il 26 Mag 2014
s2 = regexp(string, '-', 'split')

Più risposte (0)

Categorie

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

Community Treasure Hunt

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

Start Hunting!

Translated by