How to split a String ?

16 次查看(过去 30 天)
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 个评论
sujayandra vaddagiri
oops..... just got it
s2 = regexp(string, '-', 'split')
the cyclist
the cyclist 2013-6-19
You should put this comment as an answer below, and then accept that answer. That will help people looking for similar solutions later.

请先登录,再进行评论。

采纳的回答

sujayandra vaddagiri
s2 = regexp(string, '-', 'split')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by