Ss Exp-3
Ss Exp-3
AIM:-
To performs operations on signals and sequences such as addition, multiplication, scaling,
shifting, folding, computation of energy and average power.
SOFTWARE REQURIED:-
1.MATLAB R2010a.
2. Windows 11.
THEORY:-
Basic Operation on Signals:
Time shifting: y(t)=x(t-T)The effect that a time shift has on the appearance of a signal If T
is a positive number, the time shifted signal, x(t-T) gets shifted to the right, otherwise it gets
shifted left.
𝒙(𝒏) 𝒙(𝒏 − 𝑻)
𝒛𝑻
Signal Amplification/Attenuation:
Multiplication/ Division:
of two signals, their product is also a signal. z (t)=x(t) y (t)
folding:
y(n)={x(-n)} : y=fliplr(x); n=-fliplr(n):
PROCEDURE:-
Open MATLAB
Open new M-file
Type the program
Save in current directory
Compile and Run the program
For the output see comm
PROGRAM:
clc; %clear command window
%ADDITION OF SIGNALS
y1=x1+x2; %adding both signals
OUTPUT:
nf=-fliplr(nx);
subplot(2,2,4); %create a subplot, fourth figure in 2x2 grid
OUTPUT:
%SHIFTING
figure; %create another figure window
OUTPUT:
%SEQUENCE OPERATIONS
n1=1:1:10; %define discrete time vector from 1 to 10 with a step of 1
%ADDITION
s3=s1+s2; %addition of sequences
%PRODUCT
s3=s1.*s2; %product of sequences
OUTPUT:
%SCALING
figure; %create another figure window
OUTPUT:
%FOLDING OF A SEQUENCE
L2=length(s2); %create a variable to know the length of sequence
nf2=-fliplr(nx1);
OUTPUT:
p1 %display power
p2 %display power
OUTPUT:
e1=
187.5000
e2=
4.0388
p1=
0.3743
p2=
0.3672
RESULT:
Various operations on signals and sequences are performed.