Read csv
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How to read csv where the first column has strings and last column has string and all the other are integers.
I have tried csvread but it gives the error: ??? Error using ==> dlmread at 145 Mismatch between file and format string. Trouble reading number from file (row 1, field 3705) ==> Ag
Error in ==> csvread at 52 m=dlmread(filename, ',', r, c);
and if I use
textread('seen.csv','delimiter', ',') gives the error
??? Error using ==> dataread Param/value pairs must come in pairs.
Error in ==> textread at 176 [varargout{1:nlhs}]=dataread('file',varargin{:});
any idea?
0 Kommentare
Antworten (1)
Walter Roberson
am 5 Apr. 2011
You cannot skip the format when using delimiter for textread()
The documentation for csvread says specifically that the file can contain only numeric values. You might be able to get away with string values (_perhaps_) if you specified the column range.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Text Files finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!