I need to take characters out of a string using isnan and str2double.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rafael Perales
am 26 Okt. 2016
Kommentiert: Thorsten
am 26 Okt. 2016
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 Kommentare
Akzeptierte Antwort
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!