Question: 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 gsm and mgsm which implement the codes given in class for classical and,
respectively, modified GramSchmidt.
Copy them in your MATLAB directory, then go back to the Command Window and
type
A hilb;
This makes A a particularly illconditioned times matrix form MATLABs matrix
library.
Then, call
Q R gsA;
Q R mgsA;
to get the computed factors Q and R respectively, Q and R with the classical,
respectively, modified GramSchmidt algorithms.
Check how close Q and Q respectively, R and R are by typing
checkQ normQ Q
checkR normR R
Finally, let us now test the quality of the Q and Q factors. At the prompt, type
orthoQ normQ
Q eye
followed by
orthoQ normQ
Q eye
These commands let you know how close to orthogonal the matrices Q respectively
Q are.
By examining checkQ, checkR, orthoQ and orthoQ explain how classical GramSchmidt and modified GramSchmidt perform on this illconditioned matrix. Take
screenshots of the Command Window, making sure the outputs to the last commands
are visible.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
