LCG - f{y<(a*x c m y output< c(output y o x<-y...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#LCG code. # LCG <- function(N,seed,a,c,m) L {#initializations # x <- (a*seed + c) %% m x output <- x o #create the numbers # for (i in 2:N)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: f {y <- (a*x + c) %% m y output <- c(output, y) o x<-y x }return(output) r }#Example from class # LCG(100,3,2,0,5)...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online