MATLAB: Does the EIGS function return incorrect results for large matrices in MATLAB 7.6 (R2008a)

MATLAB

I am calling the EIGS function to get the smallest eigenvalue and eigenvector of a symmetric real matrix A of size 5120 x 5120 as follows:
[V,ev] = eigs(A,1,'sa');
I am verifying the results by comparing the following two values
ev
nAiV = norm(Ai*V)
The two values above are significantly different for large matrices. The matrix A used above is ill-conditioned and that is what might be causing this discrepancy. No error or warning messages are thrown.

Best Answer

This enhancement has been incorporated in Release 2011a (R2011a). For previous product releases, read below for any possible workarounds:
Incorrect values of the eigenvalues and eigenvectors are possibly returned because the EIGS function fails to converge. To workaround this issue try the following modifications in the options structure:
1. Increase the maximum number of iterations by increasing opts.MAXIT
2. Try to make the subspace larger by playing around opts.P
3. Play with opts.V0, particularly if you know what smallest eigen vector should be close to.
4. Set the tolerance, opts.TOL to larger value than default one.
The options structure can be included in the EIGS function call as follows:
opts.maxit = 1000;
[V,ev] = eigs(A,1,'sa',opts);