Dear all, I want to read desired lines from a large data set(>50GB) which is not possible to load all the data by simply invoking textscan.
what I can think is:
fid = fopen('data.dat');
nline = 0; 
wline = 1000: 10^7; 
i = 1; 
while ~feof(fid)||nline<max(wline)
    ldata = fgets(fid);
    nline = nline+1;
    if nline == wline(i)
        datas(i) = ldata;
        i= i+1;
      end    
 end
as you see, this loop is really time consuming. my questions is: 1. is there any function to read it faster (on Unix system) 2. is it possible to use pointer, so that just read the desired line
thank you
George
dataset 10^9 lines and 4 columns
0 0 0 0.5
0 0.05 200.05 1 ...