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