Docsity

CS 323E Homework 10: Hilbert Matrices and Condition Number, Assignments of Health sciences

Toggle sidebar
bg1
CS 323E Homework 10 Due: April 22 2003
1. The MATLAB command hilb(n) generates an nร—nHilbert matrix, which we denote
by Hn. Try n= 3,10,20 in the following problems:
1) (4 points)
Solve:
Hnxn=bn
for xn, where bn=Hnโˆ—ones(n,1).
Use the MATLAB command โ€œ\โ€ to solve the above system. (See help mldivide).
b) (2 points)
How close is xnto the exact solution? Comment.
c) (4 points)
Explain the accuracy of xn. Use the command cond to get the condition number of Hn.
2. (5 points)
Does the MATLAB command โ€œ\โ€ do pivoting? Give an example to justify your answer.
3. (Use pen & paper). Let
A=๎˜”10โˆ’16 10โˆ’17
โˆ’10โˆ’16 10โˆ’17๎˜•
a) (2 points)
Compute the determinant of A.
b) (5 points)
Compute ฮบ1(A) = kAk1ยท kAโˆ’1k1.
c) (2 points)
Is Anearly singular? Comment.
d) (1 point)
Does the small magnitude of the determinant imply that Ais nearly singular?
4. The MATLAB command pascal(n) generates an nร—nPascal matrix, which we denote
by Pn. Try n= 16 in the following.
a) (1 point)
Using MATLAB, find the determinant of Pn.
b) (1 point)
Using MATLAB, find the condition number of Pn.
c) (3 points)
Is Pnclose to singularity? Comment.

Partial preview of the text

Download CS 323E Homework 10: Hilbert Matrices and Condition Number and more Assignments Health sciences in PDF only on Docsity!

CS 323E Homework 10 Due: April 22 2003

  1. The MATLAB command hilb(n) generates an n ร— n Hilbert matrix, which we denote by Hn. Try n = 3, 10 , 20 in the following problems:
  1. (4 points) Solve: Hnxn = bn for xn, where bn = Hn โˆ— ones(n, 1 ). Use the MATLAB command โ€œ\โ€ to solve the above system. (See help mldivide). b) (2 points) How close is xn to the exact solution? Comment. c) (4 points) Explain the accuracy of xn. Use the command cond to get the condition number of Hn.
  1. (5 points) Does the MATLAB command โ€œ\โ€ do pivoting? Give an example to justify your answer.
  2. (Use pen & paper). Let

A =

[

10 โˆ’^16 10 โˆ’^17

โˆ’ 10 โˆ’^16 10 โˆ’^17

]

a) (2 points) Compute the determinant of A. b) (5 points) Compute ฮบ 1 (A) = โ€–Aโ€– 1 ยท โ€–Aโˆ’^1 โ€– 1. c) (2 points) Is A nearly singular? Comment. d) (1 point) Does the small magnitude of the determinant imply that A is nearly singular?

  1. The MATLAB command pascal(n) generates an n ร— n Pascal matrix, which we denote by Pn. Try n = 16 in the following.

a) (1 point) Using MATLAB, find the determinant of Pn. b) (1 point) Using MATLAB, find the condition number of Pn. c) (3 points) Is Pn close to singularity? Comment.