  # Exercises

## General Information

We require you to take part in the exercises and deliver your solutions to the tasks distributed in the lectures (see also Criteria). Each Tuesday, a task sheet will be distributed. For those, who missed to get one, we provide online versions of the sheets below.

You will also find accompanying material like m-files, data, etc. on these pages. Sometimes, we might give hints for the solution of your tasks.

## Helpers

Lars Mentrup has collected two little helpers to get you started with MATLAB and Unix.

A very short Intro to UNIX (56kB)
A very short Intro to MATLAB (70kB)

## Exercise 1

Here is the task sheet and the MATLAB programs referred to by the sheet.

Exercise sheet 1 (75kB)
Matlab file oldeps.m (487B)

## Exercise 2

Exercise sheet 2 (74kB)

## Exercise 3

Exercise sheet 3 (69kB)

And here is a proof of the formulas for the row-sum, column-sum and spectral matrix norms:

Supplement to Exercise sheet 3 (61kB)

## Exercise 4

Here is exercise 4:

Exercise sheet 4 (92kB)

## Exercise 5

An other beautiful sheet:

Exercise sheet 5 (59kB)

And a MATLAB m-file that allows to see the failure of high order interpolation on Runge's test case
Please Note: I added a modified version that should run now (including function polyinterp)
rungeinterp.m (4KB)

## Exercise 6

In this sheet we will deal with Discrete Fourier Transforms (DFT):

Exercise sheet 6 (59kB)
MATLAB data file sunspot.dat (4kB)

For an example of the solution to the sunspots assignement, see the textbook by C. Moler (see the Literature list or Cleve Moler's online book )
An M-file is also available as part of the book's attached software package (see http://www.mathworks.com/moler/ncm/sunspotstx.m ).

## Exercise 7

In this sheet we will deal with the piecewise interpolation concept:

Exercise sheet 7 (65kB)
MATLAB data file spline.dat (927B)
MATLAB data file splinedelta.dat (921B)

## Exercise 8

A real life least squares problem, a finite difference error approximation and a quadrature implementation:

Exercise sheet 8 (136kB)
MATLAB data file delamo.dat (140B)

The solution to the first assignment with a LAPACK interface was hard to get. One possibility is to get the Lapack for MATLAB package and compile the corresponding mex-files. The other possibility is to download my solution in the following zip-file. It works for MATLAB version 7.0.4 on an Intel Pentium M based Laptop. You might want to recompile the two dynamic load libraries (dlls) by issuing the commands mex dgeqrf.c and mex dormqr.c (possibly with appropriate options, see the MATLAB documentation).

s8a1_with_mexfiles.zip (9kB)

## Exercise 9

Exercise sheet 9 (63kB)

## Exercise 10

Eigenvalues:

Exercise sheet 10 (68kB)
MATLAB file plot_pspec.m (2kB) for plotting the pseudo-spectrum

## Exercise 11

More proofs on eigenvalue problems:

Exercise sheet 11 (63kB)