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.

174 Chapter 5 THE DISCRETE FOURIER TRANSFORM<br />

function y = cirshftt(x,m,N)<br />

% Circular shift of m samples wrt size N in sequence x: (time domain)<br />

% -------------------------------------------------------------------<br />

% [y] = cirshftt(x,m,N)<br />

% y = output sequence containing the circular shift<br />

% x = input sequence of length N<br />

error(’N must be >= the length of x’)<br />

end<br />

x = [x zeros(1,N-length(x))];<br />

n = [0:1:N-1]; n = mod(n-m,N); y = x(n+1);<br />

In the second approach, the property (5.37) can be used in the frequency<br />

domain. This is explored in Problem P5.20.<br />

□ EXAMPLE 5.12 Given an 11-point sequence x(n) =10(0.8) n , 0 ≤ n ≤ 10, determine and plot<br />

x ((n − 6)) 15<br />

.<br />

Solution<br />

MATLAB script:<br />

>> n = 0:10; x = 10*(0.8) .^ n; y = cirshftt(x,6,15);<br />

>> n = 0:14; x = [x, zeros(1,4)];<br />

>> subplot(2,1,1); stem(n,x); title(’Original sequence’)<br />

>> xlabel(’n’); ylabel(’x(n)’);<br />

>> subplot(2,1,2); stem(n,y);<br />

>> title(’Circularly shifted sequence, N=15’)<br />

>> xlabel(’n’); ylabel(’x((n-6) mod 15)’);<br />

The results are shown in Figure 5.18.<br />

□<br />

6. Circular shift in the frequency domain: This property is a dual<br />

of the preceding property given by<br />

DFT [ W −ln<br />

N x(n)] = X ((k − l)) N<br />

R N (k) (5.38)<br />

7. Circular convolution: A linear convolution between two N-point<br />

sequences will result in a longer sequence. Once again we have to<br />

restrict our interval to 0 ≤ n ≤ N − 1. Therefore instead of linear<br />

shift, we should consider the circular shift. A convolution operation<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!