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


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
Polynomials: Simple curves are polynomials of various degrees, or orders. The degree is the integer of the highest exponent in the expression. The illustrations are as follows

Advanced File Input and output: Where 'format' involves the conversion characters much like those used in the fprintf function. For illustration, to read the file 'subjexp.dat

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

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

Tracing: Sometimes, when a program has loops and/or selection statements and is not running properly, it is helpful in the debugging process to know exactly which statements h

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

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

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 Nested functions: For illustration, the function below computes and returns the volume of a cube. Three arguments are then passed to it, for the width and length of

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