Skip to content

readline

io · scripts/io/readline.m

: str = readline (filename)
: str = readline (fid)

Read one line of text from a file (MATLAB R2018b+ compat).

When filename is a character vector or string, the file is opened, the first line is read, and the file is closed. When fid is a numeric file identifier from fopen, the next line is read with fgetl.