how i can remove the spacing from strings like this
i have this string ( STEP NOT OF PETS ) and i want it to be like this ( STEPNOTOFPETS )

댓글 수: 2

Walter Roberson
Walter Roberson 2019년 6월 23일
Character vector? Or string() object?
ahmad abusara
ahmad abusara 2019년 6월 23일
Character vector

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

답변 (2개)

madhan ravi
madhan ravi 2019년 6월 23일

1 개 추천

regexprep(yourstring,' ','')

댓글 수: 1

madhan ravi
madhan ravi 2019년 6월 23일
Also you could use strrep() in place of regexprep().

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

Walter Roberson
Walter Roberson 2019년 6월 23일

0 개 추천

yourstring(yourstring == ' ') = '' ;

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

질문:

2019년 6월 23일

답변:

2019년 6월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by