Question

I would like to solve an eigenvalue problem for a PDE by a finite difference method. Therefore my problem is reduced to a matrix eigenvalue problem. The thing is that the size of this matrix will be quite large, and if I use the function eig it searches for ALL the eigenvalues and eigenvectors, which in my case is a waste of time.

Is there a possibility to make the eigenvalue algorithm stop after finding the first k eigenvalues? (where k is a small positive integer)

Était-ce utile?

La solution

Yes, use eigs to return the K largest or smallest eigenvalues.

Example: eigs(A,[],K) will return the K largest-magnitude eigenvectors of matrix A.

Autres conseils

You are looking for eigs. From help eigs:

Find a few eigenvalues and eigenvectors of a matrix

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top