精華區beta MATLAB 關於我們 聯絡資訊
※ 引述《robrob (慢慢的學習)》之銘言: : 我現在有個矩陣 : M=sparse(5000,5000); : --------- : 補充一下 : A B n nx 都是定值 : M22=(-(diag(-2*A-n+1-nx^2)+diag(B,1)+diag(B,-1))*nx); : M12=((diag(C/2,2)+diag(-B-n(1:Npt-1)+1-nx^2,1)+diag(B+n(1:Npt-1)-1+nx^2,-1) : +diag(-C/2,-2))/i/dL); : M11=((diag(-2*beta*A-n+1-beta*nx^2)+diag(beta*B,1)+diag(beta*B,-1))*nx); : M21=((diag(beta*C/2,2)+diag(-beta*B-n(1:Npt-1)+1-beta*nx^2,1) : +diag(beta*B+n(1:Npt-1)-1+beta*nx^2,-1)+diag(-beta*C/2,-2))/i/dL); : M=[M11 M12;M21 M22]; : ---------- : 現在要求 : M*X=0 : X=? You meant M*X = lambda*X? : 然後 我用eigs 可是跑出來 只有6個值??? Did you use eigs(M) or eigs(M, num), num > 6? For example, >> A = rand(8); >> [V D] = eigs(A,8); diag(D) Warning: For nonsymmetric and complex problems, must have number of eigenvalues k < n-1. Using eig(full(A)) instead. > In eigs>checkInputs at 819 In eigs at 86 ans = 4.1518 -0.6278 0.4448 - 0.3889i 0.4448 + 0.3889i -0.3430 - 0.3799i -0.3430 + 0.3799i 0.3186 0.1559 Well, if you really want to find M*X = 0 then just pick those X determined from eigs() and without zero eigenvalues. : 順便徵求 有更好的方法求出X嗎 ※ 編輯: saltlake 來自: 152.16.233.74 (01/15 00:54)
robrob:感謝你 01/15 03:59