Page 225 - MATLAB an introduction with applications
P. 225
210 ——— MATLAB: An Introduction with Applications
A − A
φ= kk AA
2A kA
1
t =
2φ
1
c =
2
+
1 t
s = t c
s
(c) Compute τ from τ=
+
1 c
(d) Modify the elements in the upper half of A:
A = A − t A kA
*
kk
kk
*
A = A − t A kA
AA
AA
*
A = A = 0
*
k A
kA
*
*
A = A = A − ( s A + τ A ki ), i ≠ , k i ≠ A
ki
ik
ki
i A
*
*
A = A = A + ( s A − τ A i A ), i ≠ , k i ≠ A
i A
iA
i A
ki
s
where τ=
+
1 c
(e) Update the matrix P
P = P − s P + τ P ik )
*
ik
( iA
ik
P = P + s P − τ P iA )
*
( ik
iA
iA
Repeat the procedure until the A < ∈, where ∈ is the error tolerance.
kA
4.12 HOUSEHOLDER REDUCTION TO TRIDIAGONAL FORM
The computational procedure is carried out with i = 1, 2, …, n – 2 as described below:
(a) Define A′ as the (n – i) × (n – i) lower-right hand portion of A
, ]
(b) Let x = [A i+ 1, i A i+ 2, i ...A n i T
(c) Compute |x|. Let k = |x| if x > 0 and k = –|x| if x < 0
1
1
(d) Let u = [k + x x x ...x ni − ] T
2 3
1
2
u
(e) Compute H = || / 2
(f ) Compute V = A′ / u H
T
(g) Compute g = u v /2H
(h) Compute w = V − gu
T
T
(i) Compute the transformation A ←A′ – w u – u w
(j) Set A i,i +1 = A i +1, i = –k