Logical errors, MATLAB in Statistics

Logical errors:

The Logical errors are more complicated to locate, as they do not result in any error message. The logical error is a mistake in reasoning by the programmer, but it is not a fault in the programming language. An illustration of a logical error would be dividing by 2.54 rather than of multiplying in order to convert inches to centimeters. The outcome printed or returned would be wrong, but this may not be obvious.

All the programs must be robust and must wherever possible anticipate potential errors, and guard against them. For illustration, whenever there is input into a program, the program must error-check and make sure that the input is in the accurate range of values. Also, before dividing, the denominator must be checked to make sure that it is not zero.

In spite of the best precautions, there are bound to be errors in the programs.

 

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







Related Discussions:- Logical errors, Assignment Help, Ask Question on Logical errors, Get Answer, Expert's Help, Logical errors Discussions

Write discussion on Logical errors
Your posts are moderated
Related Questions
Vectorizing: In most of the cases in MATLAB, loops are not essential. As MATLAB is written specifically to work with the vectors and matrices, most operations can be completed

Illustration of Customizing plots: Illustration, the bar and barh functions by the default place a width of 0.8 between bars. Whenever called as bar(x,y), the width of 0.8 is

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

Illustration of Mode When there is more than one value with similar (highest) frequency, then the smaller value is mode. In the case below, as 3 and 8 appear twice in the vecto

Example of Functions which complete a task: For illustration, the function below just prints the number arguments passed to it in a sentence format: As this function i

Use of function polyval: The better the curve fit, the more exact these interpolated and extrapolated values will be. By using the subplot function, we can loop to display the

Vectors of nested structures: The Combining vectors and nested structures are possible to have a vector of structures in which several fields are structures themselves. Here i

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

Rectangle - graphics objects: The other core graphics object is the rectangle that can have curvature added to it (!!). Merely calling the function rectangle without any argum