% Linear Algebra: Theory and Applications % Ward Cheney & David Kincaid % JBPub.com (c) 2008 % File: exp8211.m % Example 8.2.11 A = [4.,7.,-3.; 2.,-4.,6.; -3.,2.,5.; 1.,-2.,4.] b = [1.; 5.; 7.; -3.] [Q, R] = qr(A) x = R$\Q'*b e = A'*R