Working of editor and debugger, MATLAB in Statistics

Working of Editor and debugger:

Editor/Debugger, or commands can be typed from Command Window. For illustration, the dbstop command below will set a breakpoint in the fifth line of this function (that is the action of the if clause), that allows us to type the variable names and/or expressions to examine their values at that point in the execution. The dbcont function can be used to carry on the execution, and dbquit is used to quit the debug mode.

Note that the prompt becomes K>> in the debug mode.

>> dbstop testifelse 5

>> testifelse(-2)

5 disp('In middle of range')

K>> x

x =


K>> 3 < x

ans =


K>> 3 < x < 6

ans =


K>> dbcont

In middle of range



By typing the expressions 3 < x and then 3 < x < 6, we can conclude that the expression 3 < x will return either 0 or 1. Both 0 & 1 are less than 6, therefore the expression will always be true, despite of the value of x!

Posted Date: 10/20/2012 4:24:54 AM | Location : United States

Related Discussions:- Working of editor and debugger, Assignment Help, Ask Question on Working of editor and debugger, Get Answer, Expert's Help, Working of editor and debugger Discussions

Write discussion on Working of editor and debugger
Your posts are moderated
Related Questions
Example of customizing plots: As the other illustration of customizing plots, the pieces of a pie chart can be "exploded" from the rest. In this situation, the two vectors are

Introduction and Purpose In the lectures and tutorials you have been introduced to a number of probability distributions. You have also learned that modelling any system (such

Help function: Function is computing the two values, there are two output arguments in the function header (i.e., area & circum), that are placed in the square brackets [ ]. A

Need of a nested loop: How would we sum each individual column, rather than getting an overall sum? Answer: The programming technique would need a nested loop in whi

Operation on file: We concentrate first on the fgetl function that reads strings from the file one line at a time. The fgetl functions afford more control over how the data is

Illustration of Binary search: An illustration to search for the key of 91 in the vector is as shown below: The table below shows what will happen in each iteration of

Debugging Techniques: Any error in the computer program is called a bug. This word is thought to date back to the 1940s, whenever a problem with an early computer was found to

Illustration of Indexing into vectors of structures: For illustration, the function to print the information from packages has been modified therefore in addition to the vecto

Roots function - Polynomials: The roots function in MATLAB is used to find the roots of an equation represented by a polynomial. For illustration, for the mathematical functio

fscanf function - file function: The fscanf reads matrix variable mat columnwise from the file specified by fid. The 'format' involves conversion characters much similar to th