How to split a String ?

조회 수: 18 (최근 30일)
sujayandra vaddagiri
sujayandra vaddagiri 2013년 6월 19일
답변: sujayandra vaddagiri 2014년 5월 26일
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
sujayandra vaddagiri 2013년 6월 19일
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
sujayandra vaddagiri 2014년 5월 26일
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