% Script M-file to generate statistics for 12.540 class % % Seed the random number generator (can be removed later) % (use Seed to compatability with older versions of matlab). s = 11; rand('seed',s); randn('seed',s+1); unif_sig = 1.0; gauss_sig = sqrt(unif_sig/12); % N = 1000; % Used 1000 samples uv = rand(N,1)-0.5; gv = randn(N,1)*gauss_sig; dbn = 0.1; % db is bin width bins = -1.5:dbn:1.5; % Histogram counts values N(k) Count bin(k)<=x