MATLAB: How to split a String

split string

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.

Best Answer

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