search for: initialpop

Displaying 1 result from an estimated 1 matches for "initialpop".

2009 Sep 09
2
Matrix multiplication and random numbers
...I?m sure there is a way to keep the randomness of the different matrices but I think I?m putting the for loop in the wrong place. Also when I try and save the matrices using write.table only the first one is saved The code so far is below, any help would be greatly appreciated Cheers Tom InitialPop<-matrix(c(500,0,0,0,0,0,0)) matmult<-function(InitialPop,N){ mat3<-matrix(c(0,rnorm(1,0.6021,0.0987),0,0,0,0,0,0,0,rnorm(1,0.6021,0.0987),0,0,0,0,1.9,0,0,rnorm(1,0.6021,0.0987),0,0,0,4.8,0,0,0,rnorm(1,0.6021,0.0987),0,0,9.7,0,0,0,0,rnorm(1,0.6021,0.0987),0,18,0,0,0,0,0,rnorm(1,0.6021,0.09...