Digital Signal Processing Reference
In-Depth Information
% Pass R as 1 to evaluate from 0 to pi radians, or
% Pass R as 2 to evaluate from 0 to 2*pi radians
% Pass TimeOpt as 1 to let n (the time indices for x1
% and x2) be computed as n = -(N-1)/2:1:(N-1)/2 for N odd
% or n = -N/2+1:1:N/2; for even N.
% Pass FreqOpt as 1 for symmetrical frequency computation
% and display (-R*pi to +R*pi, for example) or as 2 for
% frequency comp.and display from 0 to R*pi
% Sample calls:
% LVxDTF T_MS([cos(2*pi*25*(0:1:100)/100)],0,...
% exp(j*2*pi*10*(0:1:100)/100),500,2,1,1)
% LVxDTF T_MS([cos(2*pi*25*(0:1:100)/100)],0,...
% exp(-j*2*pi*10*(0:1:100)/100),500,2,1,1)
% LVxDTF T_MS([cos(2*pi*25*(0:1:100)/100)],0,...
% exp(-j*pi/2),500,2,1,1) % shifts phase
% LVxDTF T_MS([exp(j*2*pi*25*(0:1:100)/100)],0,...
% exp(-j*2*pi*10*(0:1:100)/100),500,2,1,1)
% LVxDTF T_MS([cos(2*pi*25*(0:1:100)/100)],0,...
% exp(j*2*pi*12.5*(0:1:100)/100),1000,2,1,1)
% LVxDTF T_MS([1 0 1],2,1,300,2,1,1)
% LVxDTF T_MS([1 0 1],0,exp(j*2*pi*1*(0:1:2)/3),...
% 100,2,1,1)
% LVxDTF T_MS([cos(2*pi*25*(0:1:100)/100)],0,...
% exp(j*2*pi*12.5*(0:1:100)/100),200,2,1,1)
% LVxDTF T_MS([1 0 1],0,exp(j*2*pi*(0:1:2)/3),300,2,1,1)
10. Compute 1200 evenly distributed frequency samples of the DTFT (i.e., a numerical approximation
of the DTFT) for the three following sequences:
(a) [0.1,0.7,1,0.7,0.1]
(b) [1,0,0,0,1]
(c) [0.95 n - 0.85 n ] for 0
≤∞
11. Numerically compute the inverse DTFTs of the three numeric DTFTs computed in the previous
exercise (for item (c), compute the inverse DTFT for n = 0:1:2).
12. Compute the net output signal obtained by convolving the signal
n
x
=
0 . 5 cos ( 2 πn/ 16 )
+
0 . 3 sin ( 5 πn/ 16 )
with the impulse response [1,0,-1] two ways, first, by performing the time domain convolution, and second,
by computing the DTFT of the impulse response to determine the magnitude and phase responses for the
frequencies in the signal, and then scaling and shifting the two signal components, and finally summing
the two scaled and shifted signal components to obtain the net output response. Verify that the results
are the same during steady state.
Search WWH ::




Custom Search