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
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

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

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

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

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

function sortrows - sorting strings: The function sortrows sorts each and every row as a block, or group, and it also will work on numbers. Here in this illustration the rows

Graphics objects: The objects involve graphics primitives like lines and text, and also the axes used to orient the objects. These objects are organized hierarchically, and the

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

Determine sequence weights for the sequences ACTA, ACTT, CGTT, and AGAT in problem 1 by using Thompson, Higgins, and Gibson method a) compute pairwise distances between sequences

Illustration of Binary search: An illustration to search for the key of 91 in the vector is as shown below: The table below shows what will happen in each iteration of