Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In a class announcement this week, you will be given scripts for the MATLAB functions gs . m and mgs . m , which implement

In a class announcement this week, you will be given scripts for the MATLAB functions gs.m and mgs.m, which implement the codes given in class for classical and,
respectively, modified Gram-Schmidt.
Copy them in your MATLAB directory, then go back to the Command Window and
type
A = hilb(8);
This makes A a particularly ill-conditioned 8\times 8 matrix form MATLABs matrix
library.
1
Then, call
[Q1, R1]= gs(A);
[Q2, R2]= mgs(A);
to get the computed factors Q1 and R1, respectively, Q2 and R2, with the classical,
respectively, modified Gram-Schmidt algorithms.
Check how close Q1 and Q2, respectively, R1 and R2 are by typing
checkQ = norm(Q1 Q2)
checkR = norm(R1 R2)
Finally, let us now test the quality of the Q1 and Q2 factors. At the prompt, type
orthoQ1= norm(Q1
Q1 eye(8)),
followed by
orthoQ2= norm(Q2
Q2 eye(8))
These commands let you know how close to orthogonal the matrices Q1, respectively
Q2, are.
By examining checkQ, checkR, orthoQ1 and orthoQ2, explain how classical GramSchmidt and modified Gram-Schmidt perform on this ill-conditioned matrix. Take
screenshots of the Command Window, making sure the outputs to the last 4 commands
are visible.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 1 Lncs 8055

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013 Edition

3642402844, 978-3642402845

Students also viewed these Databases questions

Question

Distinguish between filtering and interpreting. (Objective 2)

Answered: 1 week ago