fclose(fid)closes the specified file, if it is open, and returns 0 if successful and -1 if unsuccessful.
fidis a file identifier associated with an open file. (See
fopenfor a complete description of
fclose('all') closes all open files, (except standard input, output, and error) and returns 0 if successful and -1 if unsuccessful.
(c) Copyright 1994 by The MathWorks, Inc.