Digital Signal Processing Reference
In-Depth Information
1
0
−1
0
50
100
150
(a) Sample Number
1
0
−1
0
50
100
150
(b) Sample Number
5
0
−5
0
50
100
150
(c) Sample Number
Figure 4.13: (a) First sinusoidal sequence, having one cycle per 32 samples; (b) Second sequence, having
two cycles per 32 samples; (c) Correlation sequence of waveforms shown in (a) and (b).
Graphically, this may be likened to time-reversing one of the sequences and passing the left-most
sequence (now having negative time indices since it has been time-reversed) to the right through the
other sequence, sample-by-sample, and computing the sum of products of overlapping samples for each
shift.
Correlation, as we have seen above, may be graphically likened to sliding one sequence to the left
through the other, summing the products of overlapping samples at each shift to obtain the corresponding
correlation value. Correlation can thus be computed as a convolution, by first time-reversing one of the
sequences to be correlated prior to computing the convolution.
Example 4.16.
Compute the correlation sequence of
[
5 , 4 , 3 , 2 , 1
]
and
[
1 , 2 , 3 , 4 , 5
]
using MathScript's
xcorr function and again using its conv function, and compare the result.
The correlation sequence, obtained by the call
ycorr = xcorr([5,4,3,2,1],[1,2,3,4,5])
 
Search WWH ::




Custom Search