You are on page 1of 2
SJacobi method to find the eigen value and eigen vector SJacobi method is only applicable to real symmetric matrices Sinput only real symmetric matcix SThis code is only for Standard eigen value problen SFor Generalized eigen value problem we can use this code by converting it Sto Standard eigen value problem by multiplying P inverse with k 8 Kx-PX if P id identity matrix it is standaatd eigen value problem if p is not identity matrix it is generalized eigen value problem \ we can convert to standard eigen value problem my pre multilying by P SINVERSE WITH & 669213; 6 18 6 10 6; 964215 1. 210 18 8 6; 13.611 6 24] —% Input Matrix Im, n)=size (aye % Size of matrix, m should be equal to n for Ssquare symmertric marrix EV = eye (myn); Sinitialze @ = 1/1000000; ‘Tolerance value for convergence J= eye (mn) ‘Find the Maximum value of of£-diagonal element AN=A-diag (diag (A)); ANsabs (AN) 7 maxValue= max(AN(:)) 7 | %Absolute maximum value of the off diagonal element Ip al= find(aN == maxValue,1, ‘first'); 2*A (pra) «/ (ACG) -A(B YP): ttheta= atan(t); theta-ttheta. /2; ssin (theta) ecos (theta) Jtpp)-cr Jtpead=sr Hap) Jaa)=c7 sRotation matrix Ded *AYT; EV=EVes'; error =sqrt (sumsqr (A- diag(diag(A)))); © sum of off diagonal term if (error < @) status = 0; end Rigenvector= (FV) Eigenvalue 9728 6470 2885 .7377 +8996 Bigenvecter 0.6353 0.2374 0.2432 0.6061 0.3370 6433 2137 -3335 601d 2602 3807 3673 4208 0148 21368 Pubiched with MATLAB R2016b

You might also like