| MATLAB Function Reference | Search  Help Desk |
| fclose | See Also |
status = fclose(fid)
status = fclose('all')
status = fclose(fid)
closes the specified file, if it is open, returning 0 if successful and -1 if unsuccessful. Argument fid is a file identifier associated with an open file (See fopen for a complete description).
status = fclose('all')
closes all open files, (except standard input, output, and error), returning 0 if successful and -1 if unsuccessful.
ferror Query MATLAB about errors in file input or output
fopen Open a file or obtain information about open files
fprintf Write formatted data to file
fread Read binary data from file
fscanf Read formatted data from file
fseek Set file position indicator
ftell Get file position indicator
fwrite Write binary data from a MATLAB matrix to a file