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
Data structure layers: There are many layers in this variable. For illustration,  cyls is the whole data structure, that is a vector of structs  cyls(1) is a separate

Functions which return Values versus printing: Also, the function which computes and returns values (throughout the output arguments) does not generally print them; that is le

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

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

Illustration of Indexing: Though, rather than of creating the index vector manually as shown here, the process to initialize the index vector is use to a sort function. The al

WHILE Loops: The while statement is used as a conditional loop in MATLAB; it is used to repeat an action whenever ahead of the time it is not known how many times the action w

Illustration of nested for loops and the if statements: For illustration,when the file contains: 33   -11  2  4      5   9 22     5  -7  2     11    3 the outco

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

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

Core Objects: The Core Objects in MATLAB are the very fundamental graphics primitives. The description can be found under the MATLAB Help: Under the Contents tab, click the Ha