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.

24 Chapter 2 DISCRETE-TIME SIGNALS AND SYSTEMS<br />

In MATLAB the function ones(1,N) generates a row vector of N ones.<br />

It can be used to generate u(n) over afinite interval. Once again an<br />

elegant approach is to use the logical relation n>=0. Toimplement<br />

{<br />

1, n ≥ n0<br />

u(n − n 0 )=<br />

0, n n = [0:10]; x = (0.9).^n;<br />

4. Complex-valued exponential sequence:<br />

x(n) =e (σ+jω0)n , ∀n<br />

where σ produces an attenuation (if 0)<br />

and ω 0 is the frequency in radians. A MATLAB function exp is<br />

used to generate exponential sequences. For example, to generate<br />

x(n)=exp[(2 + j3)n], 0 ≤ n ≤ 10, we will need the following MATLAB<br />

script:<br />

>> n = [0:10]; x = exp((2+3j)*n);<br />

5. Sinusoidal sequence:<br />

x(n) =A cos(ω 0 n + θ 0 ), ∀n<br />

where A is an amplitude and θ 0 is the phase in radians. A MAT-<br />

LAB function cos (or sin) isused to generate sinusoidal sequences.<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!