% EE 438 Digital Signal Processing with Applications 
% Random Signals
% file: random_signals_3.m
% Computing a Histogram
%---------------------------------------------------------------
% Initialize
clear all;
close all;
%---------------------------------------------------------------
% Parameters
N = 10^5	% sample size
delta = 0.2	% bin width
%---------------------------------------------------------------
n = 1:1:N;
x = randn(1,N);
b = -4:delta:4;
hist(x,b)
tstrng=sprintf('Histogram for %5.2e i.i.d N(0,1) r.v. with DELTA = %5.2f',N,delta)
title(tstrng)
xlabel('x')
ylabel('N*f_X(x)')
