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):
$ \frac{1}{3}$ = 0.3333
$ \sqrt(2)$ = 1.4142
$ e^{-10}$ = 4.5400e-005
$ e^{10}$ = 2.2026e+004
$ \frac{1}{10}$ = 0.1000
$ \frac{1}{10^6}$ = 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 $ Ax = b$ , a small change in the data can have big consequences for the solution. Here the intrinsic properties of the matrix $ A$ play a role.



Previous      Next      Up      Contents


Esteur 2010-03-22