Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

National Institute of Technology

Uttarakhand

LAB ASSIGNEMNT OF

Digital Signal Processing

Submitted By Submitted to:


Ashutosh Chauhan Dr. Hariharan Muthusamy
BT17ECE034
%Q1
% Input
x = [1 , 0 , 1 , 2 , -1 , 3 , 2]
% Origin
o1 = 0;
% Impulse Response
h = [1 , 1 , 2 , 2 , 1 , 1];
% Origin
o2 = 0;
% Length
l1 = length(x);
l2 = length(h);
% Defining the final length of the sequence.
n = 0 : ((l1 + l2 - 1) - 1);
% Shifting operation
n1 = n + (o1 - o2);
% Calling the myconv() function for calculating theconvolution of the
% sequences. myconv( function created as a separate '.m' file
y = myconv(x , h);
figure(1);
% Plot discrete waveform
stem(n1,y);
grid on;
xlabel('Discrete Axis [n]');
ylabel('Amplitude');
title('Linear Convoultion of signals');

%Q1.b
% Input Sequence
x = [3 , 11 , 7 , 0 , -1 ,4 , 2];
% Origin at '0'
o1 = 3;
% Impulse Response
h = [2 ,3 ,0 ,-5 ,2 ,1];
Thank you for using www.freepdfconvert.com service!

Only two pages are converted. Please Sign Up to convert all pages.

https://www.freepdfconvert.com/membership

You might also like