Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- G=[0,0,1,0,0,0;1,0,0,1,0,0;1,0,0,0,0,0;1,0,1,0,0,1;0,0,1,1,0,1;0,0,0,1,1,0]
- c=sum(G,1);
- p=0.8;
- d=0.2/4
- A=ones(4,4)/4;
- for i=1:4
- for j=1:4
- if c(j)~=0
- A(i,j)=p*G(i,j)/c(j)+d;
- end
- end
- end
- v=rand(4,1) //initial guess vector
- for k = 1:20
- w=A*v;
- lambda=v'*w;
- v=w/norm(w);
- end
- v
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement