0
votes

I am simulating a physical system, where I need to calculate the eigenvalues and vectors of a very large (~10000x10000) matrix. So far I have used the in-built Eig algorithm in MATLAB but it is very slow for large matrices. Is there other algorithms in MATLAB that would do a better job or can I somehow improve the performance of Eig? Specifically it turns out that I only need the first ~100 eigenvectors of the matrix starting from the smallest numerical eigenvalue. Is there a way to get the algorithm to calculate only the first N eigenvectors and eigenvalues to save computation time? Of course this would only work if the eigenvectors come out sorted but they seem to do so, because of the symmetry of the Matrix I am using.

1
Any characteristics of your matrix? (Sparse, Hermitian and so on) - Jeon
Not sure about its performance, but try svd(x, 'econ') - Jeon
The matrix, call it K, has the following structure: K(i,i) = a K(i,i+1) = b K(i+1,i) = b K(i+N,i) = b K(i,i+N) = b Here N is a fixed number and i=1...10000. It is symmetric and hermitian. - user13514
I.e. it has zeros everywhere except on 5 different "diagonals". I hope you understand the explanation above. It is a discretization of the 2D laplacian, if that helps. - user13514

1 Answers

0
votes

Your matrix has mostly zeros, so you should make it a sparse matrix. You'll then be able to use EIGS to calculate a smaller number of eigenvalues and eigenvectors.

http://www.mathworks.com/help/matlab/ref/eigs.html