function [A,shift] = SQR(A,ITER)
%
% shifted QR Method for find one eigenvalue,
% using a_(n,n) as shift. This code works for 
% symmetric matrices.

n = size(A,1);
shift = [];
for k =1:ITER
   shift = [shift,A(n,n)];
   [Q, R] = qr((A-shift(end)*eye(n)));
   A      = R * Q + shift(end)*eye(n);
end


