% P3
% Checks out SchurPlus
clc
randn('seed',0)
n = 6; A = randn(n,n); A = A'*A; v = randn(n,1);
[Q,D,mu,x] = SchurPlus(A,v);

% Naive computation of mu and x...
[Q0,D0] = schur(A+v*v');
[mu0,k] = max(diag(D0));
x0 = Q0(:,k);
format long
fprintf('mu  = %20.16f\nmu0 = %20.16f\n',mu,mu0)
dominantEvecs_x_and_x0 = [x x0]
fprintf('\ncosOfAngle = %20.16f\n',abs(x'*x0))


