Graphics Programs Reference
In-Depth Information
Computation of Eigenvalues
Once the desired eigenvalues are bracketed, they can befound by determining the
roots of P n (
λ
)
=
0 with bisection orBrent's method.
eigenvals3
The function eigenvals3 computes the m smallest eigenvalues of a symmetric
tridiagonal matrix with the method of Brent.
function eVals = eigenvals3(C,D,m)
%ComputesthesmallestmeigenvaluesofA=[C\D\C].
% USAGE: eVals = eigenvals3(C,D,m).
% C and D must be delared 'global' in calling program.
eVals = zeros(m,1);
r = eValBrackets(C,D,m); % Bracket eigenvalues
for i=1:m
% Solve
|
|
for eVal by Brent's method
eVals(i) = brent(@func,r(i),r(i+1));
A - eVal*I
end
functionf=func(eVal);
% Returns
|
A - eVal*I
|
(last element of Sturm seq.)
global C D
p = sturmSeq(C,D,eVal);
f = p(length(p));
EXAMPLE 9.12
Determine the three smallest eigenvalues of the 100
×
100 matrix
2
1
0
···
0
12
1
···
0
0
12
···
0
A
=
.
.
.
. . .
. . .
···
00
12
Search WWH ::




Custom Search