Experiment No. 4: Department of Electronics & Comm - Engg
Experiment No. 4: Department of Electronics & Comm - Engg
ENGG
Experiment No. 4
Aim : To develop program modules based on sequences like signal shifting, signal folding, signal
addition, signal multiplication.
Apparatus : PC with MATLAB software
Theory: when we process signal it may go under several manipulations involving the independent
variable or the amplitude of the signal. The basic operations on signals are:
a.)Time shifting: The time shifting of continues signal may be represented as: y(t)=x(t-T). The time
shifting of a signal may result in time delay or time advance.
b.)Signal folding: The signal folding of continues signal may be represented as :y(t)=x(-t).
c.)Signal addition: The sum of two continues time signals x1(t) and x2(t) can be obtained by adding their
values at every instant of time.
d.)Signal multiplication: The multiplication of two continues signals can be performed by multiplying
their values at every instant.
Procedure :
1. Open matlab
2. Open new m-file
3. Type the program
4. Save in current directory
5. Compile and run the program
Program:
4(A)Signal folding:
clc;
close all;
clear all;
t=-2:1:2;
x=[1,2,3,1,1];
subplot(2,1,1);
stem(t,x)
xlabel('time');
DEPARTMENT OF ECE
UID- 16BEC1169
DEPARTMENT OF ELECTRONICS & COMM.ENGG
ylabel('amplitude');
title('input signal')
t1=-t;
subplot(2,1,2);
stem(t1,x)
xlabel('time');
ylabel('amplitude');
title('folding')
4(A)Signal shifting:
clc;
close all;
clear all;
t=-2:1:2;
x=[1,2,3,1,1];
subplot(2,1,1);
stem(t,x)
xlabel('time');
ylabel('amplitude');
title('input signal')
n=input('enter the no. shifting:-');
t2=t+n;
subplot(2,1,2);
stem(t2,x)
xlabel('time');
ylabel('amplitude');
title('shifting')
DEPARTMENT OF ECE
UID- 16BEC1169
DEPARTMENT OF ELECTRONICS & COMM.ENGG
x2=[1,2,3,1,1];
subplot(3,1,2);
stem(t1,x2)
xlabel('time');
ylabel('amplitude');
title('second input signal')
t2=t+t1;
subplot(3,1,3);
stem(t2)
xlabel('time');
ylabel('amplitude');
title('addition')
Output :
DEPARTMENT OF ECE
UID- 16BEC1169
DEPARTMENT OF ELECTRONICS & COMM.ENGG
4(A) Signal folding: 4(B) Signal Shifting:
DEPARTMENT OF ECE
UID- 16BEC1169