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.

72 Chapter 3 THE DISCRETE-TIME FOURIER ANALYSIS<br />

>> Y_check = conj(fliplr(X)); % conj(X(-w))<br />

>> error = max(abs(Y-Y_check)) % Difference<br />

error =<br />

0<br />

□ EXAMPLE 3.11 To verify the folding property (3.9), let x(n) bearandom sequence over −5 ≤<br />

n ≤ 10 uniformly distributed between [0, 1]. The MATLAB verification is as<br />

follows.<br />

□<br />

>> n = -5:10; x = rand(1,length(n));<br />

>> k = -100:100; w = (pi/100)*k; % frequency between -pi and +pi<br />

>> X = x * (exp(-j*pi/100)).^(n’*k); % DTFT of x<br />

% folding property<br />

>> y = fliplr(x); m = -fliplr(n); % signal folding<br />

>> Y = y * (exp(-j*pi/100)).^(m’*k); % DTFT of y<br />

% verification<br />

>> Y_check = fliplr(X); % X(-w)<br />

>> error = max(abs(Y-Y_check)) % Difference<br />

error =<br />

0 □<br />

□ EXAMPLE 3.12 In this problem we verify the symmetry property (3.10) of real signals. Let<br />

x(n) =sin(πn/2), −5 ≤ n ≤ 10<br />

Then using the evenodd function developed in Chapter 2, we can compute<br />

the even and odd parts of x(n) and then evaluate their discrete-time Fourier<br />

transforms. We will provide the numerical as well as graphical verification.<br />

MATLAB script:<br />

>> n = -5:10; x = sin(pi*n/2);<br />

>> k = -100:100; w = (pi/100)*k; % frequency between -pi and +pi<br />

>> X = x * (exp(-j*pi/100)).^(n’*k); % DTFT of x<br />

% signal decomposition<br />

>> [xe,xo,m] = evenodd(x,n); % even and odd parts<br />

>> XE = xe * (exp(-j*pi/100)).^(m’*k); % DTFT of xe<br />

>> XO = xo * (exp(-j*pi/100)).^(m’*k); % DTFT of xo<br />

% verification<br />

>> XR = real(X); % real part of X<br />

>> error1 = max(abs(XE-XR)) % Difference<br />

error1 =<br />

1.8974e-019<br />

>> XI = imag(X); % imag part of X<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!