title: Finding eigenvector corresponding to smallest eigenvalue
body: <p>I want to find the corresponding eigenvector of the eigenvalue of minimum magnitude of a matrix U. What is the easiest way to do this?</p>
  
  <p>Currently I am using the algorithm</p>
  
  <pre><code>[evecs, D] = eigs(U);
  evals = diag(D);
  smallesteig = inf;
  for k = 1:length(evals)
      if (evals(k) &lt; smallesteig)
          smallesteig = evals(k);
          vec = evecs(:, k);
      end
  end
  </code></pre>
  
  <p>Is there a more efficient way of doing this?</p>