Delete letters in a string variable
Ältere Kommentare anzeigen
Hi,
for instance, string variables are '2456.00A', '2501A',...
How can I delete letters in a string variable?
Thanks in advance.
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 31 Mai 2013
Bearbeitet: Azzi Abdelmalek
am 31 Mai 2013
s={'2456.00A', '2501A'};
out=cellfun(@(x) x(regexp(x,'[^a-zA-Z]')),s,'un',0)
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!