Reading specific lines from text file
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I have a text file (PCdata.txt) which I wish to read lines Xa, Xb and than lines Xa+14, Xb+14, Xa+14*2, Xb+14*2 … Xa+14*n, Xb+14*n until the end of the file.
Can some please explain me how to do it.
Cheers.
0 Kommentare
Antworten (1)
Image Analyst
am 25 Sep. 2012
Look up the help for fread(), fgets() or fgetl(), and fclose(). Basically, open the file, with fgets() read Xa-1 lines and ignore them, then read the Xa'th line, throw away some more lines until you get to the Xb'th line and then read that, etc.
Siehe auch
Kategorien
Mehr zu Files and Folders 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!