Delete letters in a string variable
Afficher commentaires plus anciens
Hi,
for instance, string variables are '2456.00A', '2501A',...
How can I delete letters in a string variable?
Thanks in advance.
Réponse acceptée
Plus de réponses (1)
Azzi Abdelmalek
le 31 Mai 2013
Modifié(e) : Azzi Abdelmalek
le 31 Mai 2013
s={'2456.00A', '2501A'};
out=cellfun(@(x) x(regexp(x,'[^a-zA-Z]')),s,'un',0)
Catégories
En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!