home x0=100 s0 = 10; x = x0 + s0*randn x = x0 + s0*randn(2) x = x0 + s0*randn(1,6) x = x0 + s0*randn(252,1) xm(1) = mean( x ) x = x0 + s0*randn(252,1); xm(2) = mean( x ) for i=1:1000 x = x0 + s0*randn(252,1); xm(i) = mean( x ); end figure, plot( xm, '*' ) set( gca, 'fontsize', 18 ) hold on, plot( [0 1000], 99.23*[1 1], '-r' ) x = x0 + s0*randn(252,1e3); sx = std( x ) figure, plot( sx, '*' ), set(gca, 'fontsize', 18 )