Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A = matrix(c(0.5, 0.5, 0,
- 0.5, 0, 0.5,
- 0, 0.5, 0.5), nrow = 3, byrow=T)
- A
- [,1] [,2] [,3]
- [1,] 0.5 0.5 0.0
- [2,] 0.5 0.0 0.5
- [3,] 0.0 0.5 0.5
- g = eigen(t(A))
- sg = as.numeric(g$vec[,1])
- sg = sg/sum(sg)
- sg
- [1] 0.3333333 0.3333333 0.3333333
- g %*% A # check
- [,1] [,2] [,3]
- [1,] 0.3333333 0.3333333 0.3333333
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement