Delete letters in a string variable
Mostrar comentarios más antiguos
Hi,
for instance, string variables are '2456.00A', '2501A',...
How can I delete letters in a string variable?
Thanks in advance.
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 31 de Mayo de 2013
Editada: Azzi Abdelmalek
el 31 de Mayo de 2013
s={'2456.00A', '2501A'};
out=cellfun(@(x) x(regexp(x,'[^a-zA-Z]')),s,'un',0)
Categorías
Más información sobre Characters and Strings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!