n=20;
dt=1;
y=[0 cumsum(dt^0.5.*randn(1,n))]; % standard Brownian motion
plot(0:n,y);
