|MATLAB Function Reference|
Query MATLAB about errors in file input or output
message = ferror(fid)
returns the error string,
fid is a file identifier associated with an open file (See
fopen for a complete description of
message = ferror(fid,'clear')
clears the error indicator for the specified file.
[message,errnum] = ferror(...)
returns the error status number
errnum of the most recent file I/O operation associated with the specified file.
If the most recent I/O operation performed on the specified file was successful, the value of
message is empty and
ferror returns an
errnum value of
errnum indicates that an error occurred in the most recent file I/O operation. The value of
message is a string that may contain information about the nature of the error. If the message is not helpful, consult the C run-time library manual for your host operating system for further details.