Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (i in 1:length(tran.mat)){
- p.state <- p.state %*% tran.mat[[i]]
- }
- p.state <- c(1,0,0)
- tran.mat<-lapply(1:10,function(y){apply(matrix(runif(9),3,3),1,function(x){x/sum(x)})})
- for (i in 1:length(tran.mat)){
- p.state <- p.state %*% tran.mat[[i]]
- }
- print(p.state)
Add Comment
Please, Sign In to add comment