FUNCTION REFERENCE

fclose

Close one open file or all of them.

Close one open file or all of them.

Syntax

status = fclose(fid)

Syntax

status = fclose('all')

Returns 0. A file id that is not open is an error. Open files are also closed when

the session ends.

Example

fid = fopen('a.txt', 'w'); fclose(fid)   % 0

Differences from MATLAB: none known.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.