Digital Signal Processing Reference
In-Depth Information
1
10
0
0
−10
−1
0
10
20
30
0
10
20
30
(a) Sample
(c) Bin
1
10
0
0
−10
−1
0
10
20
30
0
10
20
30
(b) Sample
(d) Bin
1
5
0
0
−1
0
10
20
30
0
10
20
30
(e) Sample
(g) Bin
1
5
0
0
−1
0
10
20
30
0
10
20
30
(f) Sample
(h) Bin
Figure 3.9: (a) and (b) Real and Imaginary parts of a complex impulse response or sequence, consisting
of five cycles of a cosine; (c) and (d) Real and Imaginary parts of the DFT of the impulse response shown
collectively by (a) and (b); (e) and (f ) Real and Imaginary parts of the product of a five-cycle cosine with
a one-cycle cosine; (g) and (h) Real and Imaginary parts of the DFT of the impulse response shown
collectively by (e) and (f ).
If x is complex, care must be taken as MathScript automatically conjugates a vector when it is
transposed. In such case this code, which restores the signs of the imaginary parts of x after transposing,
gives proper results:
x = [(1+j) 2 (3+j) 4]; N=length(x); nkvec = 0:1:N-1;
W = exp(nkvec'*nkvec).ˆ(-j*2*pi/N); dft = W*conj(x'),
mfft = fft(x)
3.11 DF T OF COMMON SIGNALS
We'll investigate the DFT of a number of standard signals using a series of examples. All of the scripts
described in the examples below scale the DFT by 1 /N .
Example 3.12.
Compute and display the DFT of a square wave synthesized from a finite number of
harmonics.
Figure 3.11 shows the computation window generated by the script call
 
Search WWH ::




Custom Search