MATLAB Function Reference    
fgetl

Read line from file, discard newline character

Syntax

Description

tline = fgetl(fid) returns the next line of the file associated with the file identifier fid. If fgetl encounters the end-of-file indicator, it returns -1. (See fopen for a complete description of fid.) fgetl is intended for use with text files only.

The returned string tline does not include the line terminator(s) with the text line. To obtain the line terminators, use fgets.

Examples

The example reads every line of the M-file fgetl.m.

See Also

fgets


  fftshift fgetl (serial)