
This being an iterative process, however, it very much depends on the actual data you give it.Įdit: There is a wealth of information and references about this method here, and the key to understanding exactly why this happens is surely contained somewhere therein. In short: it simply takes the algorithm more iterations to converge when you ask it for the smallest eigenvalues of a structured matrix. Since matrices generated by rand have little structure, it is probably safe to assume the latter behaviour I described is not what you'd expect under normal operating conditions. I'm afraid I don't know the details of the algorithm, and so can't explain it in any deeper mathematical sense, but the page that I linked suggests ARPACK is best for matrices with some structure.

I get results where the 'lm' option consistently calls arpackc many more times than the sm option. On the other hand, trying it with eigs(rand(1000), 10, 'lm'), and Now I tried to convert the same for a ellipsoid. In the second instance it is called 103 times. achisquarevalsqrt (largesteigenval) bchisquarevalsqrt (smallesteigenval) Therefore I could extract the needed parameters to plot the ellipse. Then in the first instance it calls arpackc (the main function that does the work - according to the comments in eigs it's probably from here) a total of 22 times. If we run the profiler separately on the following two lines of code: eigs(eye(1000), 10, 'lm'), and I have run a couple of basic tests, and it depends very much on the nature of the data in the matrix.

Finally, the primary matrix A may be indefinite, e.g., after shifting vals by 50 from 1,, 100 to -49,, 50, we still can compute the 3 smallest or largest eigenvalues. The results returned above are orthogonal to those. I do this by v,ceigs(L,M,2,'SM') Where L is the lapalcian and M is the mass matrix. Note that the vectors passed in Y are the eigenvectors of the 3 smallest eigenvalues. Since eigs is actually an m-file function, we can profile it. I am trying to find the 2 eignevectors of the 2 smallest eigenvalues of a laplacian.
