A = sparse ([1,0,0,-1;0,1,0,0;0,0,1,0;0,0,2,1]);

for i = 1:50
  [vecs,vals,f] = eigs(A,1);
endfor
