istream=fopen("dummy.txt","rt");

for n = 1:4
    fgetl(istream)
endfor
fpos=ftell(istream);
first__pass = fgetl(istream)

linecount=1;
while ( ischar(fgetl(istream)))
endwhile

fseek(istream,fpos);
second_pass = fgetl(istream)
fgetl(istream)

fclose(istream);