Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dt = 1/1000
- tmax = 100
- n = Floor[tmax/dt]
- dw = Table[{i, Random[NormalDistribution[0, Sqrt[dt]]]}, {i, 1, n}];
- stepw[{i_, wi_}] := {i + 1, wi + dw[[i + 1, 2]]}
- w = NestList[stepw, {0, 0}, n];
- ListLinePlot[w]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement