13.01.2015 Views

Chapter 4: Programming with MATLAB - FET

Chapter 4: Programming with MATLAB - FET

Chapter 4: Programming with MATLAB - FET

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Finding Bugs<br />

Debugging a program is the process of finding and<br />

removing the “bugs,” or errors, in a program. Such<br />

errors usually fall into one of the following categories.<br />

1. Syntax errors such as omitting a parenthesis or<br />

comma, or spelling a command name incorrectly.<br />

<strong>MATLAB</strong> usually detects the more obvious errors and<br />

displays a message describing the error and its<br />

location.<br />

2. Errors due to an incorrect mathematical procedure.<br />

These are called runtime errors. They do not<br />

necessarily occur every time the program is<br />

executed; their occurrence often depends on the<br />

particular input data. A common example is division<br />

by zero.<br />

4-9<br />

Z.R.K

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

Saved successfully!

Ooh no, something went wrong!