error_amplification

error_amplification - >>...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
To understand how the condition number of a matrix is related to inaccuracy consider the equations we had in Problem 9.3 -1.1x 1 +10x 2 =120 -2x 1 +17.4x 2 =174 For this right hand side the sensitivity of the solution to small changes in the right hand side was high but not extreme. We can create much higher sensitivity if we replace the right hand side with the eigenvector corresponding to the largest eigenvector. Let’s first obtain the eigenvectors. A=[-1.1 10;-2 17.4]; >> [vec eigs]=eig(A) vec = -0.9934 -0.4994 -0.1145 -0.8664 eigs = 0.0529 0 0 16.2471 Next we extract the first eigenvector vec1=vec(:,1) vec1 = -0.9934 -0.1145 And we solve the equations with the eigenvector as the right hand side: >> sol1=A\vec1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
sol1 = -18.7676 -2.1638 We now repeat the process with the with the second eigenvector
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: >> vec2=vec(:,2) vec2 = -0.4994 -0.8664 >> sol2=A\vec2 sol2 = -0.0307 -0.0533 Note that in each case the solution is the eigenvector divided by the corresponding eigenvalue. Because the first eigenvalue is small and the second is large, the first solution is much higher than the second. So if we contaminate the second right hand side with a small fraction of the first >> vec2err=vec2+0.001*vec1 vec2err = -0.5004 -0.8665 We will not see much change in the right hand side, but we will see a very large change in the solution. >> sol2err=A\vec2err sol2err = -0.0495 -0.0555 The condition number of a matrix, which is a measure of the maximum amplification that can be expected when you change the data is indeed high here >> cond(A) ans = 474.3816...
View Full Document

This note was uploaded on 03/27/2012 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.

Page1 / 3

error_amplification - >>...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online