Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

Continuous and Discrete Time

Signals in MATLAB
UNIT STEP SEQUENCE
UNIT IMPULSE SEQUENCE
& EXPONENTIAL SEQUENCE

𝛿 [ 𝑛 ]= {
1𝑛=0
0 𝑛≠ 0
SINUSOIDAL SEQUENCE
& DISCRETE SEQUENCES
• Sinusoidal:

• Discrete:
EVEN & ODD SIGNAL
REPRESENTATION
 A signal is even if Xe(t) = Xe(-t).
e.g. cos (wt) = cos(-wt)

 A signal is odd if Xo(t) = -Xo(-t).


e.g. sin(wt) = -sin(-wt)

 Any signal can be expressed as the sum of even & odd part.
i.e. X(t)= Xe(t) + Xo(t) … eq(1)

 If t is replaced by –t in eq(1), we get X(-t) = Xe(t) – Xo(t) & thus


X(-t)=Xe(t) – Xo(t) … eq(2)

 Manipulating eq(1) & eq(2), we get


 Xe(t) = ½ [X(t) + X(-t)]
 Xo(t) = ½ [X(t) – X(-t)]
IMPLEMENTATION OF EVEN & ODD
SIGNALS
t=-10:0.01:10;
x= cos(2*pi*0.2*t);
revs=fliplr(x); % fliplr command is used to flip the input signal
revt=fliplr(t);
even=0.5*(x+revs);
odd=0.5*(x-revs);
subplot(221),plot(t,x),title('original signal')
subplot(222),plot(revt,x),title('flipped signal')
subplot(223),plot(t,even),title('even signal');
subplot(224),plot(t,odd),title('odd signal');
LAB TASKS
1. Compute the even and odd components of the signal if

square is a built in function which generates square wave. (n=-5:5)

2. Create a sinusoidal signal 𝑥(𝑛) = sin(2 ∗ 𝑝𝑖 ∗ 0.01 ∗ 𝑛). Create a function which
returns the plots for even and odd part of this signal. Call this function in script file
and get the desired plots.
3. Plot the given signal and compute the even and odd parts for this signal.

Plot your results.

4. Check whether the following signals are even or odd:


a. 𝑥(𝑡) = t2
b. 𝑥(𝑡) = t3
Plot these signals and state your answers with proper reasoning.

You might also like