You are on page 1of 3

EXPERIMENT NO.

4
AIM: Write a program to implement folding of discrete time signal.

OBJECTIVE: To study folding operation on discrete time signal.

Theory:

Folding is also called as reflection. It is folding of signal about time origin.


So folding means the taking the mirror image of signal that is the signal is folded
about the time at origin n=0. Here independent variable n is replaced by –n.

Folding is also termed as Time inversion too. Thus if x(n) is represented the
input signal then x(-n) represents folded input signal.

n=0 in this case we replace n by –n.

x[n]=input signal.

x[-n]=folded input signal.

Flip instruction is used to flip the matrix left to right.

Program

%Folding of discrete time signal.

clc;

Clear all;

Close; all

subplot(1,2,1)

n=(0:3)
x=[1,2,3,4]

stem(n,x)

xlabel('n')

ylabel('x(n)')

Title=('Original Signal')

subplot(1,2,2)

y=fliplr(x)

n=-fliplr(n)

stem(n,y)

xlabel('-n')

ylabel('x(-n)')

Title=('Folded Signal')

Output:
CONCLUSION:

Thus,program to implement folding of discrete time signal is execute


successfully.

You might also like