Ss Lab2
Ss Lab2
CO PO
Experiment No: 2 Date:
Title: Mathematical operations on given signals
Problem Statement:
Write the program to perform the following:
a. Mathematical operations of signals
b. Time scaling of continuous time signals
c. Time shifting of discrete time signals
d. Time shifting of continious time signals
e. Convolution of two signals
Code:
a. Mathematical operations of signals
clc;
close all;
clear all;
x=[1 2 3 4 0];
n=-1:1:3; %n=[-1 0 1 2 3];
subplot(5,1,1);
stem(n,x);
title('X');
y=[0 1 1 1 1];
subplot(5,1,2);
stem(n,y);
title('Y');
z=x+y;
s=x-y;
m=x.*y;
subplot(5,1,3);
stem(n,z);
title('Z=X+Y');
subplot(5,1,4);
stem(n,s);
title('S=X-Y');
subplot(5,1,5);
stem(n,m);
title('M=X*Y');
%______________Delayed signal______
m=n+n1;
subplot(3,1,2);
stem(m,x);
axis([-10 15 -5 6]);
title('Delayed signal x(n-n1)');
%%___________Advanced signal____________
t=n-n2;
subplot(3,1,3);
stem(t,x);
axis([-10 10 -5 6]);
title('Advanced signal x(n+n2)');
Manual Graph:
Simulated Graph:
Results:
Inference:
Evaluation:
Conduction(5)
Results/Outcome(5)
Viva(5)
Total(15)
Signature of Faculty-In-Charge