(HP71B) Eigenvalues of Symmetric Real Matrix
|
11-26-2023, 05:16 PM
Post: #1
|
|||
|
|||
(HP71B) Eigenvalues of Symmetric Real Matrix
Algorithm from HP15C Advanced Function Handbook, page 125
This version returned both eigenvectors and eigenvalues of symmetric real matrix 10 DESTROY ALL @ OPTION BASE 1 @ INPUT "N=";N 20 DIM A(N,N),B(N,N),L(N,N),Q(N,N),I0(N,N) @ MAT I0=IDN @ MAT Q=I0 30 MAT INPUT A @ MAT L=TRN(A) @ MAT A=A+L @ MAT A=(.5)*A @ MAT L=A 40 DEF FNF(N,D)=N/(D+(1-2*(D<0))*SQRT(N*N+D*D)) ! = tan(atan(N/D)/2) 100 MAT B=ZER 110 FOR I=2 to N @ FOR J=1 to I-1 120 X=L(I,J) @ IF X THEN B(I,J)=FNF(FNF(2*X,L(I,I)-L(J,J)),1) 130 NEXT J @ NEXT I 140 MAT L=TRN(B) @ MAT B=B-L @ DISP "FNORM(B)=";FNORM(B) 150 MAT L=B+I0 @ MAT L=INV(L) @ MAT L=L+L @ MAT L=L-I0 @ MAT Q=Q*L 160 DISP "Q=" @ MAT DISP Q 170 MAT L=TRN(Q) @ MAT L=L*A @ MAT L=L*Q 180 DISP "L=" @ MAT DISP L >run N=3 A(1,1)? 0,1,2 A(2,1)? 1,2,3 A(3,1)? 2,3,4 Code: FNORM(B)= .605552349352 QT A Q = L → A = Q L QT Werner recently PM me on how this work, but I have no clue. Anyone knows how it work, or reference (besides AFH) to where algorithm comes from? |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(HP71B) Eigenvalues of Symmetric Real Matrix - Albert Chan - 11-26-2023 05:16 PM
RE: (HP71B) Eigenvalues of Symmetric Real Matrix - Thomas Klemm - 11-26-2023, 07:20 PM
RE: (HP71B) Eigenvalues of Symmetric Real Matrix - Albert Chan - 11-26-2023, 07:41 PM
RE: (HP71B) Eigenvalues of Symmetric Real Matrix - Werner - 11-27-2023, 07:01 AM
RE: (HP71B) Eigenvalues of Symmetric Real Matrix - Werner - 11-26-2023, 07:44 PM
RE: (HP71B) Eigenvalues of Symmetric Real Matrix - Albert Chan - 11-26-2023, 09:26 PM
RE: (HP71B) Eigenvalues of Symmetric Real Matrix - Albert Chan - 11-26-2023, 10:05 PM
RE: (HP71B) Eigenvalues of Symmetric Real Matrix - Albert Chan - 11-27-2023, 08:07 PM
RE: (HP71B) Eigenvalues of Symmetric Real Matrix - Werner - 11-27-2023, 08:51 PM
|
User(s) browsing this thread: 9 Guest(s)