can you please tell me how to remove any special characters from a string in MATLAB?
19 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
special characters include anything else from alphabets(a-z) and(A-Z)
0 Commenti
Risposte (1)
Stalin Samuel
il 12 Mag 2015
%for example
s='matlab@123'
s(isletter(s)==0)=[];
2 Commenti
Walter Roberson
il 12 Mag 2015
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"
Vedere anche
Categorie
Scopri di più su Characters and Strings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!