Why does MATLAB return a number with a comma as a decimal point?
My Window's Regional and Language Setting is set to an area where the decimal point is represented as a comma. Why does MATLAB return numbers with a decimal comma, but when I try to use this number in another function, I get an error.
To see the bug, go to Windows' Control Panel -> Regional Options
and switch your system to a locale with a decimal comma.
Then start MATLAB and issue the command:
plot(1)
Now, hit the 'Show Plot Tools' button. When the tools are up, click on an axis of the figure, such that the bottom section of the figure showsthe 'Property Editor – Axes'. Type a fractional limit for X, Y, or Z axis and click anywhere outside the edit field to make the input active. The decimal point in the input field is replaced by a comma.
Since MATLAB does not use the decimal comma, an error dialog box opens when the limit is changed without replacing the comma by a point. When used as an argument in another function, this causes an error.
Best Answer