How to compute the middle part of a sorted eigenvalues of an extremely large sparse matrix

조회 수: 28 (최근 30일)
子冲
子冲 2025년 11월 21일 2:23
댓글: 子冲 2025년 11월 24일 3:48
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
子冲
子冲 2025년 11월 24일 3:48
I have developed an algorithm that resolves this issue. My current approach efficiently computes the Nth eigenvalue of a sorted, extremely sparse matrix with minimal resource consumption. Please feel free to contact me via email to discuss further. 12224043@zju.edu.cn

댓글을 달려면 로그인하십시오.

답변 (1개)

Steven Lord
Steven Lord 2025년 11월 21일 14:08
이동: Steven Lord 2025년 11월 21일 14:19
With 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)
ans = 11×1
1.0e+00 * -1003326.70070185 -955806.306513294 -912618.017387523 -873196.789771618 -837071.754658116 -803847.382677599 -773188.99570839 -744811.498128658 -718470.522800272 -693955.408918091 -671083.584289529
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
ds = eigs(S, 4, -800000) % 4 eigenvalues close to -800000
ds = 4×1
1.0e+00 * -803847.382677596 -773188.995708388 -837071.754658116 -744811.498128661
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by