O'Reilly logo

Programming in MATLAB ® by Ram N. Patel

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

Using the MATLAB® Debugger and Profiler

After studying this chapter, you should be able to:

  • use MATLAB’s debugging tools
  • write error free codes
  • use MATLAB profiler for writing efficient codes

8.1 Introduction

It is said that in life four things are certain: death, diseases, taxes, and program bugs. Any program, especially if it is more than a few lines long and does something significant, will usually have bugs in it. Debugging is the process of finding and correcting program bugs. Sound knowledge of debugging is very important as it will save you lots of time and mental turmoil. For programs longer than one or two pages, you can expect to spend more time debugging than anything else.

MATLAB provides you with a debugger as well as a M-file ...

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