05-Feb-2019 08:40:04 JACOBI_EIGENVALUE_TEST MATLAB version Test JACOBI_EIGENVALUE. JACOBI_EIGENVALUE_TEST01 For a symmetric matrix A, JACOBI_EIGENVALUE computes the eigenvalues D and eigenvectors V so that A * V = D * V. Input matrix A: Col: 1 2 3 4 Row 1 : 4 -30 60 -35 2 : -30 300 -675 420 3 : 60 -675 1620 -1050 4 : -35 420 -1050 700 Number of iterations = 11 Number of rotations = 21 Eigenvalues D: 1: 0.166643 2: 1.47805 3: 37.1015 4: 2585.25 Eigenvector matrix V: Col: 1 2 3 4 Row 1 : 0.792608 0.582076 0.179186 0.0291933 2 : 0.451923 -0.370502 -0.741918 -0.328712 3 : 0.322416 -0.509579 0.100228 0.791411 4 : 0.252161 -0.514048 0.638283 -0.514553 Frobenius norm error in eigensystem A*V-D*V = 9.88893e-13 JACOBI_EIGENVALUE_TEST02 For a symmetric matrix A, JACOBI_EIGENVALUE computes the eigenvalues D and eigenvectors V so that A * V = D * V. As a "sanity check", input a diagonal matrix. Input matrix A: Col: 1 2 3 4 Row 1 : 4 0 0 0 2 : 0 1 0 0 3 : 0 0 3 0 4 : 0 0 0 2 Number of iterations = 1 Number of rotations = 0 Eigenvalues D: 1: 1 2: 2 3: 3 4: 4 Eigenvector matrix V: Col: 1 2 3 4 Row 1 : 0 0 0 1 2 : 1 0 0 0 3 : 0 0 1 0 4 : 0 1 0 0 Frobenius norm error in eigensystem A*V-D*V = 0 JACOBI_EIGENVALUE_TEST03 For a symmetric matrix A, JACOBI_EIGENVALUE computes the eigenvalues D and eigenvectors V so that A * V = D * V. Use the discretized second derivative matrix. Input matrix A: Col: 1 2 3 4 5 Row 1 : -2 1 0 0 0 2 : 1 -2 1 0 0 3 : 0 1 -2 1 0 4 : 0 0 1 -2 1 5 : 0 0 0 1 -2 Number of iterations = 10 Number of rotations = 43 Eigenvalues D: 1: -3.73205 2: -3 3: -2 4: -1 5: -0.267949 Eigenvector matrix V: Col: 1 2 3 4 5 Row 1 : 0.288675 0.5 0.57735 -0.5 0.288675 2 : -0.5 -0.5 -4.44985e-17 -0.5 0.5 3 : 0.57735 5.05017e-17 -0.57735 -7.0576e-17 0.57735 4 : -0.5 0.5 1.86451e-16 0.5 0.5 5 : 0.288675 -0.5 0.57735 0.5 0.288675 Frobenius norm error in eigensystem A*V-D*V = 1.03615e-15 JACOBI_EIGENVALUE_TEST Normal end of execution. 05-Feb-2019 08:40:04