Advertisement
Guest User

Untitled

a guest
Feb 14th, 2013
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. dt = 1/1000
  2.  
  3. tmax = 100
  4.  
  5. n = Floor[tmax/dt]
  6.  
  7. dw = Table[{i, Random[NormalDistribution[0, Sqrt[dt]]]}, {i, 1, n}];
  8.  
  9. stepw[{i_, wi_}] := {i + 1, wi + dw[[i + 1, 2]]}
  10.  
  11. w = NestList[stepw, {0, 0}, n];
  12.  
  13. ListLinePlot[w]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement