June 24 2002 10:59:23.229 AM EISPACK_PRB Sample problems for EISPACK TEST01 CG computes the eigenvalues and eigenvectors of a complex general matrix. Matrix order = 4 Error flag = 0 Real and imaginary parts of eigenvalues: 1 4.82843 0.00000 2 4.00000 0.00000 3 0.361984E-06 0.00000 4 -0.828427 0.00000 The eigenvectors are: Eigenvector 1 0.653281 0.00000 0.500001 0.00000 -0.500000 0.00000 0.270598 0.00000 Eigenvector 2 0.653282 0.00000 -0.500000 0.00000 0.500000 0.00000 0.270598 0.00000 Eigenvector 3 0.00000 0.270598 0.00000 -0.500000 0.00000 -0.500000 0.00000 -0.653282 Eigenvector 4 0.00000 -0.270598 0.00000 -0.500000 0.00000 -0.500000 0.00000 0.653282 TEST02 CH computes the eigenvalues and eigenvectors of a complex hermitian matrix. Matrix order = 4 Error flag = 0 The eigenvalues Lambda: 1 -0.828428 2 -0.715256E-06 3 4.00000 4 4.82843 Eigenvectors are: Eigenvector 1 0.00000 -0.270598 0.00000 -0.500000 0.00000 0.500000 0.00000 0.653282 Eigenvector 2 0.00000 -0.270598 0.00000 0.500000 0.00000 -0.500001 0.00000 0.653281 Eigenvector 3 -0.653282 0.00000 0.500000 0.00000 0.500000 0.00000 -0.270598 0.00000 Eigenvector 4 0.653281 0.00000 0.500000 0.00000 0.500000 0.00000 0.270598 0.00000 TEST03 MINFIT solves an overdetermined linear system using least squares methods. Matrix rows = 5 Matrix columns = 2 The matrix A: 1 2 1 1.00000 1.00000 2 2.05000 -1.00000 3 3.06000 1.00000 4 -1.02000 2.00000 5 4.08000 -1.00000 The right hand side B: 1 1 1.98000 2 0.950000 3 3.98000 4 0.920000 5 2.90000 MINFIT error code IERR = 0 The singular values: 1 5.73851 2 2.70600 The least squares solution X: 1 0.963102 2 0.988544 The residual A * X - B: 1 -0.283549E-01 2 0.358148E-01 3 -0.443659E-01 4 0.747235E-01 5 0.409107E-01 TEST04 RG computes the eigenvalues and eigenvectors of a real general matrix. Matrix order = 3 The matrix A: 1 2 3 1 33.0000 16.0000 72.0000 2 -24.0000 -10.0000 -57.0000 3 -8.00000 -4.00000 -17.0000 Real and imaginary parts of eigenvalues: 1 3.00000 0.00000 2 1.00000 0.00000 3 2.00000 0.00000 The eigenvectors may be complex: Eigenvector 1 0.800000 -0.600000 -0.200000 Eigenvector 2 -25.0000 20.0000 6.66667 Eigenvector 3 47.9999 -38.9999 -12.0000 Residuals (A*x-Lambda*x) for eigenvalue 1 -0.476837E-06 -0.119209E-05 -0.178814E-06 Residuals (A*x-Lambda*x) for eigenvalue 2 -0.305176E-04 0.190735E-05 0.128746E-04 Residuals (A*x-Lambda*x) for eigenvalue 3 0.915527E-04 -0.106812E-03 -0.267029E-04 TEST05: RGG for real generalized problem. Find scalars LAMBDA and vectors X so that A*X = LAMBDA * B * X Matrix order = 4 The matrix A: 1 2 3 4 1 -7.00000 7.00000 6.00000 6.00000 2 -10.0000 8.00000 10.0000 8.00000 3 -8.00000 3.00000 10.0000 11.0000 4 -4.00000 0.00000 4.00000 12.0000 The matrix B: 1 2 3 4 1 2.00000 1.00000 0.00000 0.00000 2 1.00000 2.00000 1.00000 0.00000 3 0.00000 1.00000 2.00000 1.00000 4 0.00000 0.00000 1.00000 2.00000 Real and imaginary parts of eigenvalues: 1 2.00000 0.00000 2 0.999997 0.00000 3 4.00000 0.00000 4 3.00000 0.00000 The eigenvectors are: Eigenvector 1 1.00000 1.00000 -0.999999 1.00000 Eigenvector 2 1.00000 0.750000 -0.999999 1.00000 Eigenvector 3 0.666667 0.500000 -0.999999 0.999999 Eigenvector 4 0.333333 0.250000 -1.00000 0.499999 Residuals (A*x-(Alfr+Alfi*I)*B*x) for eigenvalue 1 0.166893E-05 0.178814E-05 0.715256E-06 -0.357628E-06 Residuals (A*x-(Alfr+Alfi*I)*B*x) for eigenvalue 2 0.137091E-05 0.923872E-06 0.134110E-06 -0.596046E-06 Residuals (A*x-(Alfr+Alfi*I)*B*x) for eigenvalue 3 0.953674E-06 0.238419E-06 0.953674E-06 0.953674E-06 Residuals (A*x-(Alfr+Alfi*I)*B*x) for eigenvalue 4 0.953674E-06 0.953674E-06 0.357628E-06 -0.238419E-06 TEST06 RS computes the eigenvalues and eigenvectors of a real symmetric matrix. Matrix order = 4 The matrix A: 1 2 3 4 1 5.00000 4.00000 1.00000 1.00000 2 4.00000 5.00000 1.00000 1.00000 3 1.00000 1.00000 4.00000 2.00000 4 1.00000 1.00000 2.00000 4.00000 The eigenvalues Lambda: 1 1.00000 2 2.00000 3 5.00000 4 10.0000 The eigenvector matrix: 1 2 3 4 1 0.707107 -0.428408E-07 -0.316228 0.632456 2 -0.707107 -0.130385E-07 -0.316228 0.632456 3 -0.243335E-07 -0.707107 0.632455 0.316228 4 0.00000 0.707106 0.632456 0.316228 The residual (A-Lambda*I)*X: 1 2 3 4 1 0.238419E-06 -0.629574E-06 0.119209E-06 0.476837E-06 2 0.178814E-06 -0.689179E-06 0.476837E-06 0.476837E-06 3 -0.133958E-07 -0.143051E-05 0.143051E-05 0.190735E-05 4 0.109377E-07 -0.476837E-06 -0.238419E-06 -0.476837E-06 TEST07 RSB computes the eigenvalues and eigenvectors of a real symmetric band matrix. Matrix order = 5 The matrix A: 1 2 3 4 5 1 2.00000 -1.00000 0.00000 0.00000 0.00000 2 -1.00000 2.00000 -1.00000 0.00000 0.00000 3 0.00000 -1.00000 2.00000 -1.00000 0.00000 4 0.00000 0.00000 -1.00000 2.00000 -1.00000 5 0.00000 0.00000 0.00000 -1.00000 2.00000 The eigenvalues Lambda: 1 0.267949 2 1.00000 3 2.00000 4 3.00000 5 3.73205 The eigenvector matrix X: 1 2 3 4 5 1 0.288675 0.500000 0.577350 -0.500000 0.288675 2 0.500000 0.500000 -0.759755E-07 0.500000 -0.500000 3 0.577350 -0.119209E-06 -0.577350 0.00000 0.577350 4 0.500000 -0.500000 0.192216E-06 -0.500000 -0.500000 5 0.288675 -0.500000 0.577350 0.500000 0.288675 The residual (A-Lambda*I)*X: 1 2 3 4 5 1 0.156462E-06 0.596046E-07 0.238419E-06 -0.119209E-06 -0.119209E-06 2 0.238419E-06 -0.178814E-06 0.327418E-07 0.00000 0.119209E-06 3 0.596046E-07 0.596047E-07 -0.238419E-06 0.00000 0.00000 4 0.253320E-06 0.119209E-06 0.328000E-07 0.00000 -0.119209E-06 5 0.745058E-08 0.238419E-06 -0.119209E-06 0.00000 -0.119209E-06 TEST08: RSG for real symmetric generalized problem. Find scalars LAMBDA and vectors X so that A*X = LAMBDA * B * X Matrix order = 4 The matrix A: 1 2 3 4 1 0.00000 1.00000 2.00000 3.00000 2 1.00000 0.00000 1.00000 2.00000 3 2.00000 1.00000 0.00000 1.00000 4 3.00000 2.00000 1.00000 0.00000 The matrix B: 1 2 3 4 1 2.00000 -1.00000 0.00000 0.00000 2 -1.00000 2.00000 -1.00000 0.00000 3 0.00000 -1.00000 2.00000 -1.00000 4 0.00000 0.00000 -1.00000 2.00000 The eigenvalues Lambda: 1 -2.43578 2 -0.520797 3 -0.164218 4 11.5208 The eigenvector matrix X: 1 2 3 4 1 -0.729545 -0.401450 -0.237202 0.820944 2 -0.374613 0.487202 0.433290 1.06255 3 0.316953 0.479940 -0.400105 1.03519 4 0.589137 -0.280953 0.167088 0.738963 Residuals (A*x-(w*I)*B*x) for eigenvalue 1 -0.614849 -0.542848E-01 -0.223044 -0.522919 Residuals (A*x-(w*I)*B*x) for eigenvalue 2 -0.676576E-01 -0.168265E-01 -0.204162 -0.292596 Residuals (A*x-(w*I)*B*x) for eigenvalue 3 -0.147165E-01 -0.561657E-01 -0.104028 -0.124549 Residuals (A*x-(w*I)*B*x) for eigenvalue 4 -1.32466 0.235424 0.345819 0.522432 TEST09: RSGAB for real symmetric generalized problem. Find scalars LAMBDA and vectors X so that A*B*X = LAMBDA * X Matrix order = 4 The matrix A: 1 2 3 4 1 0.00000 1.00000 2.00000 3.00000 2 1.00000 0.00000 1.00000 2.00000 3 2.00000 1.00000 0.00000 1.00000 4 3.00000 2.00000 1.00000 0.00000 The matrix B: 1 2 3 4 1 2.00000 -1.00000 0.00000 0.00000 2 -1.00000 2.00000 -1.00000 0.00000 3 0.00000 -1.00000 2.00000 -1.00000 4 0.00000 0.00000 -1.00000 2.00000 EThe eigenvalues Lambda: 1 -5.00000 2 -2.00000 3 -2.00000 4 3.00000 The eigenvector matrix X: 1 2 3 4 1 0.766584 0.823790E-01 -0.321682E-01 0.910021 2 0.242174 -0.813528 0.549089 0.820043 3 -0.195756 -0.833141 -0.441322 0.797051 4 -0.612372 -0.103233E-06 -0.523645E-07 0.790569 The residual matrix (A*B-Lambda*I)*X: 1 2 3 4 1 0.616847 0.823790E-01 -0.321684E-01 -0.477808 2 0.422573 0.164757 -0.643368E-01 0.915387E-01 3 0.487740 0.247136 -0.965046E-01 0.325947 4 0.616847 0.329516 -0.128673 0.477808 TEST10: RSGBA for real symmetric generalized problem. Find scalars LAMBDA and vectors X so that B*A*X = LAMBDA * X Matrix order = 4 The matrix A: 1 2 3 4 1 0.00000 1.00000 2.00000 3.00000 2 1.00000 0.00000 1.00000 2.00000 3 2.00000 1.00000 0.00000 1.00000 4 3.00000 2.00000 1.00000 0.00000 The matrix B: 1 2 3 4 1 2.00000 -1.00000 0.00000 0.00000 2 -1.00000 2.00000 -1.00000 0.00000 3 0.00000 -1.00000 2.00000 -1.00000 4 0.00000 0.00000 -1.00000 2.00000 The eigenvalues Lambda: 1 -5.00000 2 -2.00000 3 -2.00000 4 3.00000 The eigenvector matrix X: 1 2 3 4 1 0.912871 0.691752 -0.433757 0.707107 2 0.894070E-07 -0.661984 1.24971 -0.298023E-07 3 0.178814E-06 -0.751290 -1.19815 0.00000 4 -0.912871 0.721521 0.382196 0.707107 The residual matrix (B*A-Lambda*I)*X: 1 2 3 4 1 0.00000 -0.119209E-06 0.238419E-06 0.476837E-06 2 0.208616E-06 -0.357628E-06 -0.476837E-06 0.327826E-06 3 0.417233E-06 -0.476837E-06 0.238419E-06 -0.238419E-06 4 -0.476837E-06 0.715256E-06 0.596046E-07 0.238419E-06 TEST11 RSM computes some eigenvalues and eigenvectors of a real symmetric matrix. Matrix order = 4 Number of eigenvectors desired = 4 The matrix A: 1 2 3 4 1 5.00000 4.00000 1.00000 1.00000 2 4.00000 5.00000 1.00000 1.00000 3 1.00000 1.00000 4.00000 2.00000 4 1.00000 1.00000 2.00000 4.00000 The eigenvalues Lambda: 1 1.00000 2 2.00000 3 5.00000 4 10.0000 The eigenvector matrix X: 1 2 3 4 1 0.707107 -0.149012E-06 -0.316228 0.632456 2 -0.707107 -0.119209E-06 -0.316228 0.632456 3 0.243335E-07 -0.707107 0.632456 0.316227 4 0.00000 0.707107 0.632456 0.316228 The residual (A-Lambda*I)*X: 1 2 3 4 1 -0.178814E-06 -0.131130E-05 -0.357628E-06 0.00000 2 -0.238419E-06 -0.131130E-05 0.00000 0.00000 3 0.133958E-07 -0.190735E-05 0.238419E-06 0.309944E-05 4 -0.109377E-07 0.00000 0.238419E-06 0.238419E-06 TEST12 RSP computes the eigenvalues and eigenvectors of a real symmetric packed matrix. Matrix order = 4 The matrix A: 1 2 3 4 1 5.00000 4.00000 1.00000 1.00000 2 4.00000 5.00000 1.00000 1.00000 3 1.00000 1.00000 4.00000 2.00000 4 1.00000 1.00000 2.00000 4.00000 The eigenvalues Lambda: 1 1.00000 2 2.00000 3 5.00000 4 10.0000 The eigenvector matrix X: 1 2 3 4 1 0.707107 -0.149012E-06 -0.316228 0.632456 2 -0.707107 -0.178814E-06 -0.316228 0.632456 3 -0.486670E-07 -0.707107 0.632455 0.316228 4 0.00000 0.707106 0.632456 0.316228 The residual matrix (A-Lambda*I)*X: 1 2 3 4 1 0.417233E-06 -0.178814E-05 0.238419E-06 0.953674E-06 2 0.536442E-06 -0.178814E-05 0.238419E-06 0.953674E-06 3 -0.267917E-07 -0.202656E-05 0.143051E-05 0.953674E-06 4 0.218753E-07 -0.119209E-05 -0.238419E-06 0.00000 TEST13 RSPP finds some eigenvalues and eigenvectors of a real symmetric packed matrix. Matrix order = 4 The matrix A: 1 2 3 4 1 5.00000 4.00000 1.00000 1.00000 2 4.00000 5.00000 1.00000 1.00000 3 1.00000 1.00000 4.00000 2.00000 4 1.00000 1.00000 2.00000 4.00000 The eigenvalues Lambda: 1 1.00000 2 2.00000 3 5.00000 4 10.0000 The eigenvector matrix X: 1 2 3 4 1 0.707107 0.00000 0.316228 -0.632456 2 -0.707107 -0.298023E-07 0.316228 -0.632456 3 -0.486670E-07 0.707107 -0.632455 -0.316228 4 0.00000 -0.707107 -0.632456 -0.316228 The residual matrix (A-Lambda*I)*X: 1 2 3 4 1 0.417233E-06 0.119209E-06 -0.834465E-06 -0.953674E-06 2 0.536442E-06 0.119209E-06 -0.834465E-06 -0.143051E-05 3 -0.267917E-07 0.131130E-05 -0.143051E-05 -0.166893E-05 4 0.218753E-07 -0.357628E-06 0.119209E-05 0.715256E-06 TEST14 RST computes the eigenvalues and eigenvectors of a real symmetric tridiagonal matrix. Matrix order = 5 The matrix A: 1 2 3 4 5 1 2.00000 -1.00000 0.00000 0.00000 0.00000 2 -1.00000 2.00000 -1.00000 0.00000 0.00000 3 0.00000 -1.00000 2.00000 -1.00000 0.00000 4 0.00000 0.00000 -1.00000 2.00000 -1.00000 5 0.00000 0.00000 0.00000 -1.00000 2.00000 The eigenvalues Lambda: 1 0.267949 2 1.00000 3 2.00000 4 3.00000 5 3.73205 The eigenvector matrix X: 1 2 3 4 5 1 -0.288675 0.500000 -0.577350 0.500000 0.288675 2 -0.500000 0.500000 0.356231E-07 -0.500000 -0.500000 3 -0.577350 -0.998261E-07 0.577350 -0.620754E-07 0.577350 4 -0.500000 -0.500000 0.244472E-07 0.500000 -0.500000 5 -0.288675 -0.500000 -0.577350 -0.500000 0.288675 The residual matrix (A-Lambda*I)*X: 1 2 3 4 5 1 -0.216067E-06 0.00000 0.00000 0.00000 0.238419E-06 2 0.149012E-07 -0.298023E-07 0.479631E-07 0.00000 0.834465E-06 3 -0.178814E-06 0.998262E-07 0.00000 0.741223E-08 -0.238419E-06 4 0.119209E-06 0.238419E-06 0.107102E-07 0.00000 0.596046E-06 5 0.134110E-06 0.00000 0.00000 -0.119209E-06 0.119209E-06 TEST15 RT computes the eigenvalues and eigenvectors of a real sign-symmetric tridiagonal matrix. Matrix order = 5 The matrix A: 1 2 3 4 5 1 2.00000 -1.00000 0.00000 0.00000 0.00000 2 -1.00000 2.00000 -1.00000 0.00000 0.00000 3 0.00000 -1.00000 2.00000 -1.00000 0.00000 4 0.00000 0.00000 -1.00000 2.00000 -1.00000 5 0.00000 0.00000 0.00000 -1.00000 2.00000 The eigenvalues Lambda: 1 0.267949 2 1.00000 3 2.00000 4 3.00000 5 3.73205 The eigenvector matrix X: 1 2 3 4 5 1 -0.288675 0.500000 0.577350 0.500000 -0.288675 2 -0.500000 0.500000 -0.140630E-06 -0.500000 0.500000 3 -0.577350 -0.165314E-06 -0.577350 0.382170E-07 -0.577350 4 -0.500000 -0.500000 0.144122E-06 0.500000 0.500000 5 -0.288675 -0.500000 0.577350 -0.500000 -0.288675 The residual matrix (A-Lambda*I)*X: 1 2 3 4 5 1 0.134110E-06 0.00000 0.238419E-06 0.00000 -0.119209E-06 2 -0.476837E-06 -0.894070E-07 0.428408E-07 0.238419E-06 0.00000 3 0.149012E-07 -0.135002E-07 -0.119209E-06 -0.174256E-06 0.238419E-06 4 -0.596046E-07 0.149012E-06 0.128988E-06 0.00000 0.476837E-06 5 0.894070E-07 0.268221E-06 0.00000 0.238419E-06 -0.238419E-06 TEST16 SVD computes the singular value decomposition of a real general matrix. Matrix order = 4 The matrix A: 1 2 3 4 1 0.990000 0.200000E-02 0.600000E-02 0.200000E-02 2 0.200000E-02 0.990000 0.200000E-02 0.600000E-02 3 0.600000E-02 0.200000E-02 0.990000 0.200000E-02 4 0.200000E-02 0.600000E-02 0.200000E-02 0.990000 The singular values S 1 1.00000 2 0.984000 3 0.992000 4 0.984000 The U matrix: 1 2 3 4 1 -0.499987 0.707125 -0.499987 0.235177E-09 2 -0.499996 0.755489E-05 0.500007 0.707104 3 -0.500023 -0.707088 -0.500003 0.154972E-05 4 -0.499994 0.602007E-05 0.500003 -0.707109 The V matrix: 1 2 3 4 1 -0.499987 0.707125 -0.499987 0.00000 2 -0.499996 0.759959E-05 0.500007 0.707104 3 -0.500023 -0.707088 -0.500003 0.157952E-05 4 -0.499994 0.591576E-05 0.500003 -0.707109 The product U * S * Transpose(V): 1 2 3 4 1 0.990000 0.199993E-02 0.600006E-02 0.199990E-02 2 0.199993E-02 0.990000 0.200010E-02 0.600004E-02 3 0.600003E-02 0.199993E-02 0.990001 0.200009E-02 4 0.199991E-02 0.599998E-02 0.200001E-02 0.990000 EISPACK_PRB Normal end of execution.