I need to take characters out of a string using isnan and str2double.
2 次查看(过去 30 天)
显示 更早的评论
Basically I need to take out the numeric values out of a string using these functions. I keep trying but some of the characters still come out as numbers.
This is an example
a='281-890-8905';
o=length(a);
for k=1:o
x=isnan(a(k));
if x==0
y=str2double(a(k));
end
end
0 个评论
采纳的回答
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!