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
Advanced File Input and Output: In that section, we saw how to read the values entered by user using the input as well as the output functions disp and fprintf, that shows inf

Function polyval - interpolation: The function polyval can then be used to compute the polynomial at particular values. For illustration, we could compute at every value in th

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

Lower Level File I/O Functions: Whenever reading from data file, as long as the data in the file is "regular" the load function works-in another words, the similar type of dat

Example of Median For the vector [1 4 5 9 12 33], the median is the average of the 5 & 9 in the middle: >> median([1 4 5 9 12 33]) ans =     7

bjjh

Example of Core objects: The one core graphics object is a line that is also what the plot function produces. Here is an illustration of generating a line object, altering som

Example of Vectorizing: Likewise, for an operation on a matrix, a nested loop would be needed; for illustration, supposing a matrix variable mat: [r c] = size(mat); for

Mode The mode of a data set is the value which appears most often. The built-in function in a MATLAB for this is known as the mode. >> x = [9 10 10 9 8 7 3 10 9 8 5 10];

Illustrations of Sequential search: The two illustrations of calling such function is as shown below: >> values = [85 70 100 95 80 91]; >> key = 95; >> seqsearch