Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tutorials:diffusion [2015/05/08 18:52]
justin
tutorials:diffusion [2015/05/08 22:14] (current)
justin
Line 38: Line 38:
 % to get the last value in the d array - when we start this % to get the last value in the d array - when we start this
 % will just be the first value, but on each iteration of the % will just be the first value, but on each iteration of the
-% loop this will increment+% loop this will increment)
 while abs(d(end)) < A while abs(d(end)) < A
-  % put a new value at the end of the array for d the last value +  % put a new value at the end of the array for d which is 
-  % of d plus a pull from the random distribution+  % the last value of d plus a pull from the random distribution
   d(end+1) = d(end) + random('​norm',​0.1,​1);​   d(end+1) = d(end) + random('​norm',​0.1,​1);​
 end end