Read csv
17 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Walter Roberson
il 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 Commenti
Vedere anche
Categorie
Scopri di più su Text Files in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!