% Turn in the output of this script with your programs for Homework 5. disp(' ') disp('Test of MinNormSolve') [A, trash] = qr(randn(5,3), 0); A = A'; x = ones(5,1); b = A*x; xm = MinNormSolve(A, b); norm(xm - A'*b) % Should be of order 10e-16. disp(' ') disp('Test of ConstrLSQ') A = randn(10,3); b = randn(10,1); C = randn(2,3); d = randn(2,1); [x, rho] = ConstrLsq(A, b, C, d); norm(d - C*x) % Should be of order 10e-16. abs(rho - norm(b - A*x)) % Should be of order 10e-16.