Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Implement both the classical and modified Gram-Schmidt procedures in C. Use each

ID: 3671722 • Letter: I

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 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.

Explanation / Answer

qr.c

qr.h

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote