Why is MATLAB unable to read an ASCII file containing a large amount of data in a single line using the CSVREAD function?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Why is MATLAB unable to read an ASCII file containing a large amount of data in a single line using the CSVREAD function?
Akzeptierte Antwort
MathWorks Support Team
am 27 Jun. 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
This has been verified as a bug in MATLAB in the way that the CSVREAD function handles large data files.
Currently, as a workaround, try the following code:
fid = fopen('filename');
a = textscan(fid,'%n','delimiter',',');
This reads the file rather quickly and creates an array of doubles. The difference is that when CVSREAD reads the same file, it tries to have a format string with thousands of fields, one for each line of data.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!