Using the C Math Library    

Error Handling Overview 

The MATLAB C Math library routines handle error conditions in two ways, depending on the severity of the error:

The following example program illustrates this default library error handling. The program deliberately causes a warning-level error condition, division by zero, and a more severe error condition, attempting to add two matrices of unequal size, that causes termination.

This program produces the following output. You can see how this program continues processing after a warning, but terminates after an error.


 Handling Errors and Writing a Print Handler Customizing Error Handling