# Commands for simulating a Wiener process: n=10000 dW=rnorm(n,0,sqrt(1/n)) W=c(0,cumsum(dW)) Time=seq(0,1,1/n) plot(Time,W,type="l",ylim=c(-2,2))