O'Reilly logo

MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] by Manoj Kumar Sharma, Ashok Kumar Goel, Raj Kumar Bansal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.8. Errors and Warnings

In many cases, it is desirable to take specific actions when different kinds of errors occur. For example, one may want to prompt the user for more input, display extended error or warning information, or repeat a calculation using default values. Error-handling capabilities of MATLAB allow checking of particular error conditions and execute appropriate program depending on the situation.

8.8.1. Types of Errors

There are basically two types of errors:

  • Syntax errors

  • Runtime errors

Syntax errors are caused by grammatical mistakes in the statement included in the program i.e. using or not using comma, semicolon, bracket or parenthesis. It may be caused by misspelling a function name or using wrong array indices and so on. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required