U. Washington
AMATH 352  Winter 2010
Homework 4  Due on 02/19/09
The first two exercises should be submitted via Scorelator (4 attempts per exercise are available).
Remember to use the command
save
with the flag
ascii
to output your results.
Upload only
your “.m” files. You will upload, at least, one file per exercise.
1. (10 points) The goal of this exercise is to implement the QR algorithm.
•
Set
A
and
ε
.
•
while
max
i
6
=
j

a
ij

> ε
max
i

a
ii

,
–
Compute the QR factorization of
A
.
–
Overwrite
A
with the product
RQ
.
•
end while
Use the matrix
A
=
2

1

3

1
6
5

3
5
8
and
ε
= 10

12
. Count the number of iterations. Output the resulting diagonal in diagA.dat
and the number of iterations in iter.dat.
2. (10 points) Consider the norm
k
A
k
=
m
X
i
=1
n
X
j
=1

a
ij

where the matrix
A
= (
a
ij
)
m
×
n
has
m
rows and
n
columns. Write a
Matlab
code computing
this norm. Use the matrix
A
=
6
5

5
2
6

2
2
5

1
and the matrix
B
∈
R
123
×
99
generated by
Matlab
with the random function after resetting
the random generator to state 1 (check the previous homeworks). Output, in ASCII format,
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Winter '07
 Leveque
 The Matrix Reloaded, The Matrix Revolutions, Wachowski brothers, U. Washington

Click to edit the document details