23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using the <strong>MATLAB</strong> HDF4 High-Level Functions ....... 7-52<br />

Using the HDF4 Low-Level Functions ................ 7-55<br />

8<br />

Error Handling<br />

Checking for Errors with try-catch .................. 8-2<br />

Nested try-catch Blocks ............................ 8-3<br />

Handling and Recovering from an Error ............. 8-4<br />

Reporting an Error ................................ 8-4<br />

Identifying the Cause .............................. 8-5<br />

Regenerating an Error ............................. 8-8<br />

Message Identifiers ................................ 8-10<br />

Identifier Format .................................. 8-10<br />

Using Message Identifiers with lasterror .............. 8-11<br />

Warnings ......................................... 8-14<br />

Reporting a Warning ............................... 8-14<br />

Identifying the Cause .............................. 8-15<br />

Warning Control ................................... 8-16<br />

Warning Statements ............................... 8-17<br />

Warning Control Statements ........................ 8-17<br />

Output from Control Statements ..................... 8-19<br />

Saving and Restoring State ......................... 8-22<br />

Backtrace and Verbose Modes ....................... 8-23<br />

Debugging Errors and Warnings .................... 8-26<br />

9<br />

Classes and Objects<br />

Classes and Objects: An Overview ................... 9-2<br />

xv

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!