Getting Started Previous page   Next Page

try - catch

The general form of a try-catch statement sequence is

In this sequence the statements between try and catch are executed until an error occurs. The statements between catch and end are then executed. Use lasterr to see the cause of the error. If an error occurs between catch and end, MATLAB terminates execution unless another try-catch sequence has been established.


Previous page  break return Next page

© 1994-2005 The MathWorks, Inc.