Reading big textfile with textscan
Ältere Kommentare anzeigen
Hi,
I want to read a big textfile (~5MB) with textscan. The first 10 rows contain some informations which I don't need. Then 1024 rows with 1280 numbers per row follow. The numbers are separated by a comma. I found almost the right code except that each comma induces a new row instead separating the numbers. To use this code I have to delete the first 10 rows in my file.
fid = fopen('textfile.txt')
Out = textscan(fid,'%f','delimiter',sprintf(','));
fclose(fid)
How should I manipulate the code so that I get a 1024x1280 array? I tried
sprintf('\n')
instead but that just gives me the first number and then stops.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Spreadsheets finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!