str2double
Convert string to double-precision value
Syntax
Description
converts the text in string X
= str2double(str
)str
to a double-precision
value.
str
contains text that represents a number, which can contain:
Digits
A decimal point
A leading
+
or-
signAn
e
preceding a power of 10 scale factor
If str2double
cannot convert text to a number, then it returns
a NaN
value.
Examples
Limitations
This operator does not support structures. For more information about structures in Stateflow, see Access Bus Signals Through Stateflow Structures.