I am calculating eigen values and eigen function with eig function in matlab ,but it is giving wrong answers ,means accuracy wise, is there any other function in matlab ,like in numerical recipes it is said TQLI or TQRI.
Can you provide an example? Methods for computing eigenvalues are based on iterative methods that can only be accurate up to a certain point. You might try with the function eigs in Matlab if your problems are large.
Thanks Samuel for your kind reply,actually round of errors are the actual problem here,when eigen values are are very close to zero system will diverge at that point.So i want to use other methods like as i said in my question TQLI,although i was thinking to use pivotal condensation but that i cant use here as well since its tri diagonal system and it will not remain tri diagonal once i'll use pivotal condensation.
Hell Pritesh thanks for your advise but software will not make much difference as i know,since matlab is too powerful as mathematica as far as my understanding.
Thanks Pritesh but iam getting same eigenvalues from QR method as well as eig function in matlab ,i am not able to understand why it is happening like this.
1 The eigen values close to zeros means matrix is almost singular .
2. See Strang [ Lin Alg and its appl] for" effective rank " p445] where he has shown how we can control the effective rank by using SVD ie singular values of Atr*A. The rank ofAtr*A = rank of A and can be controlled with parameter e
3. Simple examples given by Strang :
A1 =[ e 2e A2 = [ e 1 A3 = [ e 1
1 2 ] 0 0 ] e 1+e]
A1 rank = 1 but round off error in pivot predicts 2 numerically
A2 rank =1 but numerically we may get zero
A3 rank =2 but Strang says its effective rank is one.(probably e approaches zero)
So the work around is to use Atr*A or A*Atr whose rank = rank A.
The eigen values are (sing vals )^2 . Based on data accuracy choose tolerance say ert= 10^-6 and choose eigen values (sing values ) above this as acceptable eigen values and set others to zero.
Thanks Ramesh,yes when eigen values are close to zero my prog will stop at that point.Since its a random case so diagonal or say site energies are random and its a symmetric matrix upper as well lower cases ,hopping energies are same,BUT round of errors will create problem,and when i am using simple EIG function in matlab ,values are coming like 0.0023 etc,so this is the problem i am facing.
The svd of atr* a gives the rank of a (in scilab 5.3.3 ) given some tolerance . This can be used to determine the acceptable number of eigen values of a . A similar method is used in DSP for Hankel matrices. Just for fun I enjoyed analyzing the above three matrices ( see pdf ).
i am simply saying that we can get eigen values of any matrix in matlab specially square matrix with EIG function,and i have calculated also.BUT i am getting wrong results dont know why,then i have seen in numerical recipes ,people talk about TQLI method to determine eigen values and eigen vectors,so i am asking is there any such method in matlab also or not,who used to take care of near zero not exactly zero eigen values or not.This is my simple and easy question.