필터 지우기
필터 지우기

cut character from string

조회 수: 62 (최근 30일)
Abdulkareem
Abdulkareem 2014년 1월 31일
편집: Amit 2014년 1월 31일
hi i need to cut some characters from a string for example ss='bs15';
i need to split ss to ss1=bs ss2=15 i used strsplit but this function is undefined in my matlab (matlab R2012a)

채택된 답변

Amit
Amit 2014년 1월 31일
편집: Amit 2014년 1월 31일
ss1 = ss(1:2);
ss2 = ss(3:4);
In matlab strings are vectors of type char. So you can use indexing.
  댓글 수: 1
Amit
Amit 2014년 1월 31일
편집: Amit 2014년 1월 31일
and strsplit function is in 2013a and later. However, strsplit needs a delimiter or space to split strings!

댓글을 달려면 로그인하십시오.

추가 답변 (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