How to split a String ?

17 visualizaciones (últimos 30 días)
sujayandra vaddagiri
sujayandra vaddagiri el 19 de Jun. de 2013
Respondida: sujayandra vaddagiri el 26 de Mayo de 2014
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 comentarios
sujayandra vaddagiri
sujayandra vaddagiri el 19 de Jun. de 2013
oops..... just got it
s2 = regexp(string, '-', 'split')
the cyclist
the cyclist el 19 de Jun. de 2013
You should put this comment as an answer below, and then accept that answer. That will help people looking for similar solutions later.

Iniciar sesión para comentar.

Respuesta aceptada

sujayandra vaddagiri
sujayandra vaddagiri el 26 de Mayo de 2014
s2 = regexp(string, '-', 'split')

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by