Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Numerical Analysis MATLAB: Compute the QR factorization of a tall real matrix using Givens rotation Compute the QR factorization of a tall m x n

Numerical Analysis MATLAB: Compute the QR factorization of a "tall" real matrix using Givens rotation

Compute the QR factorization of a "tall" m x n real matrix A ( that is, m > =n) such that the upper triangular m x n matrix R has nonnegative diagonal entries. The orthogonal matrix Q is m x m.

hint: Let D be a diagonal matrix with +1' or -1's on its main diagonal. Then, obviously, D^2=I, and D*Y is a row scaling for Y, whereas Z*D is a column scaling for Z

The code must pass this test in MATLAB:

image text in transcribed

A = [ -1 -1 8 -9; -6 2 -9 -4; 2 -6 0 -4; 8 -2 6 1];

[myQ, myR] = reference.myQR(A);

[sQ, sR] = myQR(A);

QERR = max(max(abs(myQ - sQ)));

assert(QERR

RERR = max(max(abs(myR - sR)));

assert(RERR 1A=[-1-18-9;-62-9-4; 2-60-4; 8-261); [myQ, myR] = reference.myQR(A) ; 3 [SQ, SR] = myQR (A); 4 5 QERR-max (max(abs (myQ-sQ))); 6 assert (QERR1e (-12)) 7 8 9 RERR-max(max(abs(myR-SR))) 10 assert (RERR

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

More Books

Students also viewed these Databases questions