10.2 Discrete-Time Fourier Transform 579
(^00102030405060708090100)
0.5
1
n
x[
n]
− 1 −0.8 −0.6 −0.4 −0.2^0 0.2 0.4 0.6 0.8
0
10
20
|X
(e
jω)|
− 1 −0.8 −0.6−0.4−0.2 0 0.2 0.4 0.6 0.8
− 2
0
2
<X
(e
jω)
(a) (b)
0 20 40 60 80 100 120 140 160 180 200
− 1
0
1
n
x(
n)
x(
n)
(^0) − 1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8
20
40
60
80
|X
(e
jω)|
|X
(e
jω)|
− 1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8
− 2
0
2
<X
(e
jω)
<X
(e
jω)
(c)
0 10 20 30 40 50 60 70 80 90 100
− 1
0
1
n
− 1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8
0
10
20
− 1 −0.8 −0.6 −0.4−0.2 0 0.2 0.4 0.6 0.8
− 2
0
2
ω/π
ω/π
ω/π
FIGURE 10.1
MATLAB computation of the DTFT of (a) a pulse, (b) a windowed sinusoid, and (c) a chirp: magnitude and phase
spectra are shown for each.
forsthe sampling frequency in radians/second andmaxthe maximum frequency in the signal
being sampled.
To illustrate this, we sampled a signalx(t)= 5 −^2 tu(t)withTs=0.01 sec/sample, created a vector of
256 values from the signal, and computed its FFT as before. The above script is modified to consider
the change of scale. The changes are as follows:
%%%%%%%%%%%%%%%%%%%%%
% DTFT of sampled signal
%%%%%%%%%%%%%%%%%%%%%
L = 256;Ts = 0.01; t = 0:Ts:(L - 1)∗Ts; x = 5.ˆ( - 2∗t); % sampling of signal
X = fft(x);
w = 0:2∗pi/L:2∗pi - 2∗pi/L;W = (w - pi)/Ts; % W is analog frequency