Delete letters in a string variable
Mostra commenti meno recenti
Hi,
for instance, string variables are '2456.00A', '2501A',...
How can I delete letters in a string variable?
Thanks in advance.
Risposta accettata
Più risposte (1)
Azzi Abdelmalek
il 31 Mag 2013
Modificato: Azzi Abdelmalek
il 31 Mag 2013
s={'2456.00A', '2501A'};
out=cellfun(@(x) x(regexp(x,'[^a-zA-Z]')),s,'un',0)
Categorie
Scopri di più su Characters and Strings in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!