filmov
tv
MATLAB: str2double (convert strings to numbers - double data type)

Показать описание
This short covers the MATLAB built-in function STR2DOUBLE() used for converting strings to doubles.
STR2DOUBLE() converts numbers that are currently a string or char data type to a double data type, so they can be used as a number. When an input argument does not meet this requirement (e.g., double number, text that is not a number), then the function returns NaN (for not a number). To check for NaN, use the ISNAN() built-in MATLAB function.
STR2DOUBLE() converts numbers that are currently a string or char data type to a double data type, so they can be used as a number. When an input argument does not meet this requirement (e.g., double number, text that is not a number), then the function returns NaN (for not a number). To check for NaN, use the ISNAN() built-in MATLAB function.