%BROWNIAN MOTION PATHS

n=100; %no. of trjectories

%%% parameters
dt=0.01;
t=[0:dt:100];

clf reset;
 
for (x0=[1:1:n])

   Bmt = cumsum(sqrt(dt)*randn(size(t)));
   plot(t,Bmt,'Color',[0 1-x0/n 1]);
   hold on; 

end

title('Brownian motion paths');

