Assignment:
Calculate by hand the X(omega), DTFT of the sequence x[n]=[1 1 1 1 0 0 0 0] for n=0:7, zero else.
Using Matlab, plot the real and imaginary components of your result for X(omega) for omega=0:0.01:2*pi, one plot for the real, one part for the imaginary.
On the same plots, use the Matlab fft and stem commands to plot the samples of X(omega) calculated by the DFT/FFT. Your code will look something like this.
n=0:0.01:2*pi;
plot(n,real(SOME_EQUATION_FOR_X(omega)));
hold on;
x=[1 1 1 1 0 0 0 0];
m=(0:7)*2*pi/8; % 8's the length of the sequence x[n]
stem(m,real(fft(x)));
and again in a different figure for the imaginary part.