x(1)=1; for i=2:7000; x(i)=1*x(i-1)+(rand(1)-.5); end hold on subplot(2,1,1) plot(x); subplot(2,2,3) spectrum(x);set(gca,'Ylim',[1.e-2 1e2]); hold on