octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

About str2double() and exponent identifier


From: José Luis García Pallero
Subject: About str2double() and exponent identifier
Date: Fri, 10 Apr 2020 02:46:53 +0200

Hello,

I've noted that the function str2double() only works with exponent
identifier as 'e' or 'E', but not with 'd' or 'D', that are common
identifiers in files generated using Fortran. Then

str2double('1e2') is 100, but
str2double('1d2') is NaN

This behavior is the same in Octave as well as Matlab. Exists any
technical reason in order to not consider the identifiers 'd' or 'D'
for the conversion of the reason of the Octave's behavior is for
matching the Matlab's one?

I find str2double() more convenient in a task than str2num() as the
first one is faster, but my dataset uses 'D' as exponent identifier

Thanks
-- 
*****************************************
José Luis García Pallero
address@hidden
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************



reply via email to

[Prev in Thread] Current Thread [Next in Thread]