When I use the STR2DOUBLE function to convert textual data to numerical data, misplaced commas are ignored. The result is that invalid numbers are interpreted; for example, the following call returns 401 instead of NaN:
str2double('4,01')
The documentation states that STR2DOUBLE can handle strings with commas separating the thousands places, but ignoring commas can lead to major errors in some geographic locations where ',' is used instead of a decimal point. The string '4,01' is a valid way to represent 4.01, but STR2DOUBLE returns an invalid numerical value.
Best Answer