HW3

 

Fall 2000 Homework Assignment 3

Due 9/27/00

Problem 5.4
Problem 5.6 Also calculate the mainlobe width of the Blackman window using both the -3 dB point and the -80 dB point and the sidelobe height. Compare your results with the rectangular window. Comment on what you found. 
Problem 5.27
Problem 5.30 Give the physical and computational resolution for each part of the problem

Hints for plotting windows:

Remember you need to plot the envelope of the window so you want the computational resolution to be very fine. Also, for some windows you will get zeros in the spectrum which causes difficulties with the log10 function.

n1=0:1:15;

w1=hamming(length(n1));
w2=boxcar(length(n1));

%find DFT, zero pad to length 512 to get the envelope
W1=fft(w1,512);W2=fft(w2,512);


% Normalize to one
W1=W1/max(abs(W1));W2=W2/max(abs(W2));


%calculate result in db, note that the maximum value removes the zeros in the spectrum
W1=20*log10(abs(W1));W2=20*log10(max(abs(W2),1e-10));

len=length(W1)/2;
halfn=0:1:len-1;
plot(halfn*pi/len,W1(1:len),'g-',halfn*pi/len,W2(1:len),'b-.');
axis([0 pi -80 0]);
title('sidelobe height comparison, L=16');
xlabel('radians');ylabel('Magnitude (dB)');

Page last updated 09/17/00