function [pc_day, dt] = readscn(scanfile)

fmt = '%d %d %d/%d/%d %d:%d:%d %f %d:%d %f\n';

fpscan = fopen(scanfile, 'r');
pc_day = [];
dt = [];
while (~feof(fpscan))
   % Search for a first line:
   found = 0;
   while (~found & ~feof(fpscan))
      line = fgets(fpscan);
      if length(line) > 50,
         [A, nmatch] = sscanf(line, fmt);
         if nmatch == 12,
            pc_day = [pc_day ; A(9) ];
            dt     = [dt     ; A(12)];
            found = 1;
         end
      end
   end

   % Now do a vectorized read:
   if (found & ~feof(fpscan))
      [A, nmatch] = fscanf(fpscan, fmt, [12, inf]);
      ncol = floor(nmatch/12);
      if ncol >= 1,
         pc_day = [pc_day ; A(9, 1:ncol).' ];
         dt     = [dt     ; A(12,1:ncol).' ];
      end
   end

end % while not end of file
fclose(fpscan);

