can you please tell me how to remove any special characters from a string in MATLAB?
조회 수: 12 (최근 30일)
이전 댓글 표시
special characters include anything else from alphabets(a-z) and(A-Z)
댓글 수: 0
답변 (1개)
Stalin Samuel
2015년 5월 12일
%for example
s='matlab@123'
s(isletter(s)==0)=[];
댓글 수: 2
Walter Roberson
2015년 5월 12일
It is what you defined. isletter() is true only for a-z and A-Z . If you want to leave digits alone then you need to define digits as being not "special characters"
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!