![]() |
(HP 15C) (DM15) Eigenvalues and eigenvectors of symmetric matrices - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (HP 15C) (DM15) Eigenvalues and eigenvectors of symmetric matrices (/thread-20016.html) |
(HP 15C) (DM15) Eigenvalues and eigenvectors of symmetric matrices - rawi - 05-26-2023 11:52 PM Code:
USAGE INSTRUCTIONS: Store Matrix in Matrix A Start program: GSB A When execution stops, the first eigenvalue is shown. x<>y -> The eigenvector to the eigenvalue is shown. Eigenvectors are normalized to the length of 1. R/S continues the procedure for the next eigenvalue / eigenvector. EXAMPLE: Matrix A: 1 -0.36 0.12 -0.36 1 0.09 0.12 0.09 1 Store Matrix A Activate user-Mode Start program: GSB A First stop: 1.3614 (greatest absolute eigenvalue) x<>y -> b 3 1 RCL B: 0,7149 RCL B: -0.6962 RCL B: 0,0641 R/S -> Second stop: 1,0521 (second eigenvalue) x<>y -> b 3 1 RCL B: -0.1934 RCL B: -0.2851 RCL B: -0.9388 R/S -> Third stop: 0.5866 (last eigenvalue) x<>y -> b 3 1 RCL B: 0,6719 RCL B: 0,6588 RCL B: -0,3385 METHOD: The program generates a random vector x and computes b = A*x. The length of b is computed, and b is normalized and replaces x. This is repeated until the length of b changes less than 1E-8. Then the length l of b is an estimate of the biggest eigenvalue, and x is an estimate of the corresponding eigenvector. Then l*x*x’ is subtracted from Matrix A, and the procedure is repeated. Since random numbers are used your results can be different in the fourth decimal place of the elements of the eigenvectors. MEMORY: Matrices: If n is number of rows / columns of matrix you need 2*n^2+n+1 and I. The DM 15L can handle up to 8X8 matrices. Edit: Two commands taken out, line numbers added, more explanation. |