|MATLAB Function Reference|
Read line from file, keep newline character
tline = fgets(fid)
returns the next line of the file associated with file identifier
fgets encounters the end-of-file indicator, it returns
fopen for a complete description of
fgets is intended for use with text files only.
The returned string t
line includes the line terminators associated with the text line. To obtain the string without the line terminators, use
tline = fgets(fid,nchar)
returns at most
nchar characters of the next line. No additional characters are read after the line terminators or an end-of-file.
|fgetl (serial)||fgets (serial)|