line = fgets(fid)
line = fgets(fid)returns the next line for the file with identifier
lineis a MATLAB string that includes the newline character associated with the text line (to obtain the string without the newline, use
fgetsencounters an end-of-file indicator, it returns -1.
fgets is intended for use with text files only. Given a binary file with no newline characters,
fgets may require long execution time.
(c) Copyright 1994 by The MathWorks, Inc.