02.10.2019 Views

UploadFile_6417

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Discrete-time Signals 35<br />

Rectangular Pulse<br />

Even Part<br />

x(n)<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−10 −5 0 5 10<br />

n<br />

xe(n)<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−10 −5 0 5 10<br />

n<br />

0.6<br />

Odd Part<br />

xe(n)<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

FIGURE 2.4 Even-odd decomposition in Example 2.4<br />

−10 −5 0 5 10<br />

n<br />

The sequence and its support are supplied in x and n arrays, respectively.<br />

It first checks if the given sequence is real and determines the support<br />

of the even and odd components in m array. It then implements (2.5)<br />

with special attention to the MATLAB indexing operation. The resulting<br />

components are stored in xe and xo arrays.<br />

□ EXAMPLE 2.4 Let x(n) =u(n) − u(n − 10). Decompose x(n) into even and odd components.<br />

Solution<br />

The sequence x(n), which is nonzero over 0 ≤ n ≤ 9, is called a rectangular<br />

pulse. Wewill use MATLAB to determine and plot its even and odd parts.<br />

>> n = [0:10]; x = stepseq(0,0,10)-stepseq(10,0,10);<br />

>> [xe,xo,m] = evenodd(x,n);<br />

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

>> xlabel(’n’); ylabel(’x(n)’); axis([-10,10,0,1.2])<br />

>> subplot(2,2,2); stem(m,xe); title(’Even Part’)<br />

>> xlabel(’n’); ylabel(’xe(n)’); axis([-10,10,0,1.2])<br />

>> subplot(2,2,4); stem(m,xo); title(’Odd Part’)<br />

>> xlabel(’n’); ylabel(’xe(n)’); axis([-10,10,-0.6,0.6])<br />

The plots shown in Figure 2.4 clearly demonstrate the decomposition.<br />

□<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!