# Numerical aspects of the use of MATLAB

When using MATLAB, you have to keep in mind that it is a numerical package. In numerical algorithms, the aspects of efficiency, rounding errors and data errors play a role. We will briefly illustrate the last two aspects.

Remark: When calculating numerically within the Symbolic Toolbox, you will make use of the numerical Maple algorithms instead of the numerical MATLAB algorithms.

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 , a small change in the data can have big consequences for the solution. Here the intrinsic properties of the matrix play a role.

Esteur 2010-03-22