Definitive answer on the correct str2double behavior for the string '10 20'
Ältere Kommentare anzeigen
Under Windows 7 with R2014a, str2double('10 20') evaluates to NaN. I believe this is the correct behavior, per the documentation.
A colleague working in a Linux environment with R2014a reports that str2double('10 20') evaluates to an array [10 20].
1. Is this possible (without overloading)? 2. Am I correct that the intended evaluation (without overloading) is NaN?
Thanks so much.
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 9 Jul. 2014
Bearbeitet: Azzi Abdelmalek
am 9 Jul. 2014
str2num('10 20')
will give an array, maybe that's what your colleague has used
1 Kommentar
Nicholas
am 10 Jul. 2014
Kategorien
Mehr zu Data Type Conversion finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!