Read csv
19 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Walter Roberson
2011 年 4 月 5 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!