I\'m working with MATLAB for few days and I\'m having difficulties to import a CSV-file to a matrix.
My problem is that my CSV-file contains almost only Strings and
Use xlsread, it works just as well on .csv files as it does on .xls files. Specify that you want three outputs:
[num char raw] = xlsread('your_filename.csv')
and it will give you an array containing only the numeric data (num), an array containing only the character data (char) and an array that contains all data types in the same format as the .csv layout (raw).
Depending on the format of your file, importdata might work.
You can store Strings in a cell array. Type "doc cell" for more information.
Have you tried to use the "CSVIMPORT" function found in the file exchange? I haven't tried it myself, but it claims to handle all combinations of text and numbers.
http://www.mathworks.com/matlabcentral/fileexchange/23573-csvimport