Digital Signal Processing Reference
In-Depth Information
Convolve each of the four resulting impulse responses with a chirp of length 1000 samples and
frequency varying from 0 to 500 Hz. For each of the four impulse responses, plot the impulse response
on one subplot and the chirp response on a second subplot. On a third subplot, plot the result from
numerically computing the DTFT of each impulse response, or instead use the script LV_DTFT_Basic
or the similar short version presented in the text to evaluate the DTFT and plot it in a separate window.
To display on the third subplot, create a script
LV xDT F T _ Basic(x,M,R)
based on LV_DTFT_Basic, but which delivers the DTFT as the output argument d and which does not
itself create a display.
7. For each of the four impulse responses computed above, obtain a new impulse response by subtracting
the given impulse response from the vector [zeros(1,20),1,zeros(1,20)] (this assumes that the vector n in
the previous example ran from -20 to +20).
Determine what kind of filter the four new impulse responses form. To do this, plot the magnitude
of the DTFT of each original impulse response next to the DTFT of each corresponding new impulse
response.
8. Create a script in accordance with the following call syntax, which should create plots similar to that
shown in Fig. 1.3; test it with the sample calls given below.
function LVxDTF T(x,n,M,R,FreqOpt,FigNo)
% Computes and displays the magnitude, phase, real, and
% imaginary parts of the DTF T of the sequence x having
% time indices n, evaluated over M samples.
% Pass R as 1 to evaluate over pi radians, or 2 to evaluate
% over 2*pi radians
% Use FreqOpt = 1 for symmetrical frequency evaluation
% about frequency 0 or FreqOpt = 2 for an asymmetrical
% frequency evaluation
% Sample calls:
% LVxDTF T([cos(2*pi*25*(0:1:99)/100)],[0:1:99],500,2,1,88)
% LVxDTF T([cos(2*pi*25*(-50:1:50)/100)],[-50:1:50],500,2,1,88)
% LVxDTF T([cos(2*pi*5*(0:1:20)/20)],[0:1:20],100,2,1,88)
% LVxDTF T([cos(2*pi*5*(-10:1:10)/20)],[-10:1:10],100,2,1,88)
% LVxDTF T([cos(2*pi*25*(0:1:100)/100)],[-50:1:50],500,2,1,88)
% LVxDTF T([exp(j*2*pi*25*(0:1:99)/100)],[0:1:99],500,2,1,88)
% LVxDTF T([cos(2*pi*25*(0:1:99)/100)],[0:1:99],1000,2,1,88)
9. Create a script that conforms to the following call syntax, which should create plots similar to that
shown in Fig. 1.6; test it with the sample calls given below.
function LVxDTF T_MS(x,SampOffset,FreqOffsetExp,...
% M,R,TimeOpt,FreqOpt)
% Computes and displays the magnitude, phase, real, and
% imaginary parts of the DTF T of the sequence x, evaluated
% over M samples, then computes the same for a
% modified version of x that has been shifted by
% SampOffset samples and multiplied by a complex
% exponential FreqOffsetExp.
d
=
Search WWH ::




Custom Search