PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

DTFT, DFT, ZT, and FFT 505


5.4 Examples


Example 5.1

Let f(n) = 0.6nu(n).
a. Evaluate the DTFT of f(n) by hand.
b. Create the script fi le DTFT that returns the magnitude and phase plots of the DTFT
of f(n) = 0.6nu(n) of part a, over the range −π < W < π.
c. Repeat part b by using the MATLAB function freqz.
d. Evaluate the magnitude and phase errors of the two techniques employed (part b
and part c).

ANALYTICAL Solution

Part a
FejW f n ejWn
n

() ()
 



FejW nun ejWn
n

() .()
 


∑^06 −

Fe e e
e

jW n jWn
n

jW
n

n
(). (. ) . jW








(^0606) 
1
00106
∑∑−
FIGURE 5.17
Plots of R.5.144.
Auto-correlation of fl(n)
20
10
0
Amplitude
− 7 − 6 − 5 − 4 − 3 − 2 −10 12 3 45 6 7
40
20
0
Amplitude
− 7 − 6 − 5 − 4 − 3 − 2 −10 12 3 45 6 7
40
20
0
Amplitude
− 7 − 6 − 5 − 4 − 3 − 2 −10 12 3 45 6 7
Cross-correlation of f2(n) with f1(n)
Cross-correlation of f1(n) with f2(n)
time index n
time index n
time index n

Free download pdf