Thursday, January 10, 2008

Matlab debuging

By using debug function in Matlab, it is possible to trace the error and warning code effectively. Beside using the GUI dialog to define the debug options, this can also be done through command line code.

There are many options about debug setup. Check the documment if needed. Basically, we may use the following debug model often.

  • dbstop if error
  • dbstop if caught error
  • dbstop if warning
  • dbstop if caught error
If there is a error, the processing will paused at the error breakpoint, you can check the related variabls for the error reason. This does not mean the program is stop, so if you want to stop the running, you should type in dbquit.

No comments: