% m3 --- Get optimal value of lambda, and compute xlambda, ylambda, etc.
lambda = fzero('rootfcn',[0 13]);
fprintf('The optimal lambda = %g\n',lambda)
coef = vv./(lambda+s2);
xlambda = p(:,1:r)*coef;
fprintf('xlambda = ')
vprint(xlambda)
exl = xlambda'*xlambda;
fprintf('The energy of xlambda = %g\n',exl)
fprintf('ylambda = A xlambda = ')
ylambda = A*xlambda;
vprint(ylambda)
fprintf('while the output y  = ')
vprint(y)
