Delete letters in a string variable
显示 更早的评论
Hi,
for instance, string variables are '2456.00A', '2501A',...
How can I delete letters in a string variable?
Thanks in advance.
采纳的回答
更多回答(1 个)
Azzi Abdelmalek
2013-5-31
编辑:Azzi Abdelmalek
2013-5-31
s={'2456.00A', '2501A'};
out=cellfun(@(x) x(regexp(x,'[^a-zA-Z]')),s,'un',0)
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!