The MATLAB has numerous useful functions for debugging, and debugging can also be completed through its editor, which is known as the Editor/Debugger.
Typing help the debug at prompt in the Command Window will display some of the debugging functions. In the Help Browser, clicking the Search tab and then typing debugging will also show basic information about the debugging procedure.
It can be seen in the earlier illustration that the action of the if clause was executed and it printed In Middle Of Range, although just from that it cannot be determined why this occurred. There are many ways to set breakpoints in a file (script or the function) so that the variables or expressions can be examined