Illustration of tracing a error, MATLAB in Statistics

Illustration of tracing a error:

The one way of following the flow of function, or tracing it, is to use the echo function. The echo function, that is a toggle, will show each and every statement as it is executed and also the results from the code. For scripts, merely echo can be typed, but for the functions, name of the function should be identified, for illustration,

echo functionname on/off

>> echo testifelse on

>> testifelse(-2)

% This function will test the debugger

if 3 < x < 6

   disp('In middle of range')

In middle of range

end

We can view from this outcome that the action of if clause was executed.

 

 

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







Related Discussions:- Illustration of tracing a error, Assignment Help, Ask Question on Illustration of tracing a error, Get Answer, Expert's Help, Illustration of tracing a error Discussions

Write discussion on Illustration of tracing a error
Your posts are moderated
Related Questions
Functions which complete a task without returning Values: Most of the functions do not compute values, but instead of accomplish a task like printing formatted output. As thes

Illustration of Nested loops: Running the script shows the output: >> printstars ***** ***** ***** The variable rows identifies the number of rows to print, and

Program of Persistent variables: The program below elaborates this. The script calls a function func1 that initializes a variable count to 0, then increment it, and print the

Editor/Debugger: The MATLAB has numerous useful functions for debugging, and debugging can also be completed through its editor, which is known as the Editor/Debugger. Typi

Types of errors: There are some various kinds of errors which can occur in a program, that fall into the categories of run-time errors, syntax errors, and logical errors. T

Input in a While Loop: The script below repeats the procedure of prompting a user, the reading in a positive number, and echo-printing it, as long as the user properly enters

Illustration of Input in a for loop: In this illustration, the loop variable iv iterates through the values 1 through 3, therefore the action is repeated three times. The acti

Median The median is defined only for a data set which has been sorted first, that means that the values are in order. The median of a sorted set of data values (n) is defined

Properties of the text box - graphics objects: By using get will show properties of the text box, the illustration is as shown below: >> get(thand)   BackgroundColor

Variable packages: Variable packages are now the vector of structures, hence each and every element in the vector is a structure. To show one element in the vector, an index i