FGETL

 

 Return the next line of the file as a string.

         FGETL(FID) returns the next line of a file associated with file

         identifier fid as a MATLAB string. The newline and a carriage return

  if it preceeds it are NOT included. Use FGETSRIX6WQ() to get the next line

  with those characters INCLUDED. If just an end-of-file is encountered

  then -1 is returned.

 

 

         IMPORTANT: Please note that this is intended to be used ONLY with 

                    text files. If by mistake you read a "binary" file

                    without newline characters this routine may take a

         long time for large files.

 

 

  Example: (equivalent to 'type fgetl.m')

 

 

      fid=fopen('fgetl.m');

      while 1

          line = fgetl(fid);

      if ~isstr(line), break, end

      disp(line)

      end

      fclose(fid);