% Test the constrained least square driver in problem 3.

A = rand(20,10);
b = rand(20,1);
B = rand(2,10);

[x,mu] = constrained_ls(A,b,B);

fprintf('Normal equation error: %g\n', norm(A'*(A*x-b)+B'*mu)/norm(A'*b));
fprintf('Constraint error:      %g\n', norm(B*x));
