function A = qrstep(A) % one step of the QR iteration % with shifting by A(n,n) [m,n]=size(A); rho = A(n,n); [Q,R]=qr(A-rho*eye(n,n)); A = R*Q + rho*eye(n,n);