Graphics Programs Reference
In-Depth Information
Solution
% Example 9.14 (Eigenvalue problem)
global C D
m=3;
A=[11 2 3 1 4;
2935 ;
33 54 ;
154124;
423417];
eVecMat = zeros(size(A,1),m);
% Init. eigenvector matrix.
A = householder(A);
% Tridiagonalize A.
D=diag(A);C=diag(A,1);
%ExtractdiagonalsofA.
P = householderP(A);
% Compute tranf. matrix P.
eVals = eigenvals3(C,D,m);
% Find lowest m eigenvals.
fori=1:m
%Computecorresponding
s = eVals(i)*1.0000001;
%
eigenvectors by inverse
[eVal,eVec] = invPower3(C,D,s); %
power method with
eVecMat(:,i) = eVec;
%
eigenvalue shifting.
end
eVecMat = P*eVecMat;
% Eigenvectors of orig. A.
eigenvalues = eVals'
eigenvectors = eVecMat
>> eigenvalues =
4.8739
8.6636
10.9368
eigenvectors =
-0.2673
0.7291
0.5058
0.7414
0.4139
-0.3188
0.0502
-0.4299
0.5208
-0.5949
0.0696
-0.6029
0.1497
-0.3278
-0.0884
PROBLEM SET 9.2
1.
Use Gerschgorin's theorem to determine global boundson the eigenvalues of
104
1
4 23
4 2
2
25 3
(a)
A
=
(b)
B
=
13 6
23 4
Search WWH ::




Custom Search