% plot 1-D random walk

n=10000;
x=2*round(rand(1,n))-1;
figure 
hold on
grid on
title('1-dimensional random walk');
plot(cumsum(x))


