can you please tell me how to remove any special characters from a string in MATLAB?
19 ビュー (過去 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!