The MATLAB command qr performs the QR decomposition of a matrix. erise 3.2.48 To
ID: 3210158 • Letter: T
Question
The MATLAB command qr performs the QR decomposition of a matrix. erise 3.2.48 To the interest of keeping the output uncomplicated, MATLAB delivers the assembled Q matrix. Try out the following MATLAB commands, for example n=7 A = randn(n) [Q, R] = qr (A) norm (eye (n)-Q' *o) norm (A-Q*R) Notice that MATLAB does not bother to make the main-diagonal entries of R positive, since this is not essential for most applications. A number of other ways to use the gr command will be discussed in the coming section. For further information type help qr or search in MATLAB's help browserExplanation / Answer
Those commands are already in Matlab form.Just type the exact equations in Matlab and you will get the desired results. :D
Matlab form:
n=7;
A=randn(n);
[Q,R]=qr(A);
z=Q'.*Q;
norm(eye(n)-z);
norm(A-Q.*R);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.