02.10.2019 Views

UploadFile_6417

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The Discrete Fourier Transform 157<br />

□ EXAMPLE 5.6 Let x(n) bea4-point sequence:<br />

x(n) =<br />

{ 1, 0 ≤ n ≤ 3<br />

0, otherwise<br />

a. Compute the discrete-time Fourier transform X(e jω ) and plot its magnitude<br />

and phase.<br />

b. Compute the 4-point DFT of x(n).<br />

Solution<br />

a. The discrete-time Fourier transform is given by<br />

3∑<br />

X(e jω )= x(n)e −jωn =1+e −jω + e −j2ω + e −j3ω<br />

Hence<br />

and<br />

0<br />

= 1 − e−j4ω sin(2ω)<br />

=<br />

1 − e−jω sin(ω/2) e−j3ω/2<br />

∣ ∣ ∣ ∣∣∣<br />

X(e jω ) sin(2ω)<br />

= sin(ω/2) ∣<br />

⎧<br />

⎪⎨ − 3ω<br />

̸ X(e jω 2 ,<br />

)=<br />

⎪⎩ − 3ω 2<br />

The plots are shown in Figure 5.4.<br />

b. Let us denote the 4-point DFT by X 4 (k). Then<br />

X 4(k) =<br />

3∑<br />

n=0<br />

sin(2ω)<br />

when<br />

sin(ω/2) > 0<br />

± π, when<br />

sin(2ω)<br />

sin(ω/2) < 0<br />

x(n)W nk<br />

4 ; k =0, 1, 2, 3; W 4 = e −j2π/4 = −j<br />

These calculations are similar to those in Example 5.1. We can also use<br />

MATLAB to compute this DFT.<br />

>> x = [1,1,1,1]; N = 4; X = dft(x,N);<br />

>> magX = abs(X), phaX = angle(X)*180/pi<br />

magX =<br />

4.0000 0.0000 0.0000 0.0000<br />

phaX =<br />

0 -134.9810 -90.0000 -44.9979<br />

Hence<br />

X 4(k) ={4, 0, 0, 0}<br />

↑<br />

Note that when the magnitude sample is zero, the corresponding angle is not<br />

zero. This is due to a particular algorithm used by MATLAB to compute the<br />

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).<br />

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!