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
Functions which complete a task without returning Values: Most of the functions do not compute values, but instead of accomplish a task like printing formatted output. As thes

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

Nested Structures: The nested structure is a structure in which at least one of the members is itself a structure. For illustration, a structure for the line segment may co

Illustration of Indexing into vectors of structures: For illustration, the function to print the information from packages has been modified therefore in addition to the vecto

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

MENU Function: The MATLAB also has a built-in function known as menu which will display a figure Window with push buttons for the choices. The very first string passed to the

Combining Nested FOR Loops and the IF Statements: The statements inside a nested loop can be any of the valid statement, involving any selection statement. For e.g., there can

Sorting Strings: For the matrix of strings, the sort function works exactly as formerly for numbers. For illustration, >> words = char('Hi', 'Hello', 'Howdy', 'Goodbye', '

fopen function - file function: The fopen opens the file for reading. The fscanf then reads each line one double and one character, and put each pair in individual columns in

Example of Functions which return values: Calling this function prints the circumference, since there is no way to store the value, hence, it can be used in following computat