Numerical aspects of the use of MATLAB

** Number representations and rounding errors**
All values with which MATLAB calculates are represented with a finite number of digits. The computer rounds all real numbers to a number that fits the representation that is employed.

Example (standard output representation in MATLAB):

`0.3333`

`1.4142`

`4.5400e-005`

`2.2026e+004`

`0.1000`

`1.0000e-006`

Internally, MATLAB calculates with a bigger precision than is represented on the screen. The fact that the output representation can give rise to unexpected results, becomes clear from exercise 4.21: Changing the output representation.

There we see that `rounding errors' can influence the result. Use `help format`

for more information about the possible representations of MATLAB output. The role played by rounding errors in calculations can often be reduced by cleverly organising the algorithms.

** Data errors**
Other errors that can occur are `data errors'. In exercises 4.22 and 4.23 we will illustrate that, when solving

Esteur 2010-03-22