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 Comments

oops..... just got it
s2 = regexp(string, '-', 'split')
You should put this comment as an answer below, and then accept that answer. That will help people looking for similar solutions later.

Sign in to comment.

 Accepted Answer

sujayandra vaddagiri
sujayandra vaddagiri on 26 May 2014

0 votes

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

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!