   function Mar14()
% f(x) = (Ax-b)'*(Ax-b) = x'(A'A)x - 2x'*A'*b + b'*b
% Suppose C = A'A. Then
% f(x) = C(1,1)x(1)^2 + 2*C(1,2)*x(1)*x(2) + C(2,2)*x(2)^2
%        - 2x(1)*( A(1,1)*b(1) + A(2,1)*b(2)  + A(3,1)*b(3))
%        - 2x(2)*( A(1,2)*b(1) + A(2,2)*b(2)  + A(3,2)*b(3))
%        + b(1)^2 + b(2)^2 + b(3)^2.
% Take the partial with respectto x(1) and the partial with respect to
% x(2). These are linear equations. Assemble them into matrix-vector form
% and you will get Cx = A'*b