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
Areacirc function: The areacirc function can be called from the Command Window as shown here, or from a script. Here is a script which will prompt the user for the radius of o

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

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

Illustration of Median When the vector is not in sorted order to start with, the median function will still return the right answer (it will sort the vector automatically). For

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

Example of sorting strings: To sort a cell array of strings, also the sort function is used. The illustration is as follows, >> engcellnames = {'Chemical','Mechanical',.

Logical Built-In Functions: There are built-in functions in the MATLAB which are useful in conjunction with vectors or matrices of all logical true or false values; two of the

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

Statistics There are numerous statistical analyses which can be executed on data sets. In MATLAB software, the statistical functions are in the data analysis help topic known a

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