MATLAB: Imported Numbers from excel are replaced by NaN!!(?)

import nan not a number

Hello! I am trying trying to import(create a numeric matrix) some values from excel which have about 13 decimals but matlab relpaces them with NaN. What can I do?

Best Answer

importdata() cannot deal with using comma as the decimal separator.
Unfortunately to handle numbers that use comma as the decimal separator, you must replace the command with period before converting to numeric. For example if you have a cell array of strings, then
numeric_data = str2double( regexp(YourCellArrayOfStrings, ',', '.') )