The Inverse Participation Ratio (I.P.R.) of a vector u = (u1, .... um) for i = 1, ..., m is defined as follows:
When plotting the log-log of IPR of the eigenvectors vs the eigenvalues, L, we should get something interesting, perhaps a straight line like:
But I am getting a haphazard thing:
This is my code.
m=98; n=753;
H=randn(m,n);
W=1/n*(H*(H'));
[U, lambda] = eig(W);
for i=1:size(U,2)
IPR(i,1)=0;
for j=1:98
IPR(i,1)=IPR(i,1)+U(j,i)^4;
end
L(i,1)=lambda(i,i);
end
loglog(L,IPR);
Could anyone please point out what I am doing wrong?
Aucun commentaire:
Enregistrer un commentaire