This topic has been permanently closed and transferred to MATLAB Answers.
How to compute the middle part of a sorted eigenvalues of an extremely large sparse matrix
子冲
on 21 Nov 2025 at 2:23
Latest activity Reply by Steven Lord
on 21 Nov 2025 at 14:08
I currently have a large sparse matrix H of size k×k (which is symmetric and real). If its sorted eigenvalues are denoted as Ep, I need to compute the k/2th and k/2+1th values of Ep (which I mean middle part of the sorted eigenvalues). Is there a fast method for this?
Given that H is too large to use 'eig' directly, I have also attempted 'eigs', but this proved impractical. Because 'eigs' only computes the smallest few eigenvalues of H, whereas the two values I require are not near zero.
1 Comment
Time DescendingWith the default options, eigs computes the largest eigenvalues and eigenvectors. But depending on what you specify as the sigma output argument, it can compute other quantities. If you know or can estimate a value of sigma between those two eigenvalues, you could get the eigenvalues closest to that value.
A = magic(501);
d = sort(eig(A));
S = sparse(A); % Yes, I know, Big Sparse.
format longg
d(20:30)
ds = eigs(S, 4, -800000) % 4 eigenvalues close to -800000
Comments have been disabled.