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/6
- A=ones(6,6)/6;
- for i=1:6
- for j=1:6
- if c(j)~=0
- A(i,j)=p*G(i,j)/c(j)+d;
- end
- end
- end
- v=rand(6,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