Question: Implement both the classical and modified Gram-Schmidt procedures in C. Use each to generate an orthogonal matrix Q whose columns form an orthonormal basis for
Implement both the classical and modified Gram-Schmidt procedures in C. Use each to generate an orthogonal matrix Q whose columns form an orthonormal basis for the column space of the n n Hilbert matrix H, for n = 2, . . . , 12. The Hilbert matrix has entries hij = 1/(i + j 1). For example, a 3 3 Hilbert matrix has entries:
[1 1/2 1/3; 1/2 1/3 1/4; 1/3 1/4 1/5]
As a measure of the quality of the results (specifically, the potential loss of orthogonality), plot the quantity log10(kI Q T QkF ), which can be interpreted as digits of accuracy, for each method 1 as a function of n. In addition, try applying the classical procedure twice (i.e., apply your classical Gram-Schmidt routine to its own output Q to obtain a new Q), and plot the resulting departure from orthogonality. How do the three methods compare in speed, storage, and accuracy? Implement your code by following the template files given on the class website. Submit your C code, the plots, and your conclusions of the comparative study.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
