next up previous

Exercise 1: Effects of an ill-conditioned matrix.     continued...

To continue, just send the message, send index from netlib, in your email text. Extract the programs from the email messages and compile them. To use the subroutines, you will need first to write a main program which defines the dimensions and calls the subroutines. Once the main program is in place, factor the matrix A using dgeco.f. This program will also estimate the condition number of the matrix. Using dgesl.fgif, solve a linear system, Ax=b using the matrix A given above and a right hand side vector with each entry equal to . Save your answer. Now change the first entry in the right hand side from to and solve the system again. Try this for different sizes of n. Since this is a linear system, small changes in the inputs should yield small changes in the output. So what has happened? Use dsvdc.f on the matrix A and calculate the singular values. Take the ratio of the maximum to minimum singular value. This will give you another estimate of the condition number of the matrix A. Compare this number with the one calculated by the program dgeco.f. The condition number tells you how many bits of information you can expect to lose during an inversion procedure. Given the condition number you calculated, what precision can you expect in the solution?