Answered step by step
Verified Expert Solution
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started