Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3.10 MATLAB\'s qr command, which we introduced in Exercise 3.2.48, can also be u

ID: 3281816 • Letter: 3

Question

3.10 MATLAB's qr command, which we introduced in Exercise 3.2.48, can also be used to compute QR decompositions of non-square matrices. (a) Try out the following commands, for example ber n6 A- randn (n,m) Q,R]qr (A) norm (eye (n)-' *O) norm (A-Q*R) In the interest of convenience, MATLAB returns Q in assembled form. (b) Write a short the qr command. (The submatrix R can be accessed by writing R (1 :m,1:m) or R (1:m, :), for example.) Use your script to work parts (a) and (b) of Exercise 3.3.9 This is not the simplest way to solve least squares problems using MATLAB. Recall from Exercise 3.1.5 that the command x Alb works as well. This gives you a simple way to check your work.

Explanation / Answer

Please find the output of the following program

---------------------------------------------------------------------

The answer to first question is given in as output. Here the variables are first listed with their value and finally the answer is also given in output.

---------------------------------------------------------------------

---------------------------------------------------------------------

For part B of the program, below is the code determined in fortron

---------------------------------------------------------------------

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote