Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

fclose - Close one or all open files

Syntax

fclose(fileID)
fclose('all')
status = fclose(...)

Description

fclose(fileID) closes an open file. fileID is an integer file identifier obtained from fopen.

fclose('all') closes all open files.

status = fclose(...) returns a status of 0 when the close operation is successful. Otherwise, it returns -1.

See Also

ferror | fopen

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS