0% found this document useful (0 votes)
15 views2 pages

Experiment 3

The document outlines Experiment 3 of a Digital Signal Processing course, focusing on calculating and plotting the convolution of two sequences. It explains the theory behind convolution, its significance in digital filtering, and provides MATLAB code for performing the operation. The conclusion emphasizes the utility of convolution in signal analysis and the ease of implementation in MATLAB using the conv function.

Uploaded by

manthanpatel0808
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Experiment 3

The document outlines Experiment 3 of a Digital Signal Processing course, focusing on calculating and plotting the convolution of two sequences. It explains the theory behind convolution, its significance in digital filtering, and provides MATLAB code for performing the operation. The conclusion emphasizes the utility of convolution in signal analysis and the ease of implementation in MATLAB using the conv function.

Uploaded by

manthanpatel0808
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Digital Signal Processing – 20IC210P

Experiment 3
Aim: To calculate and plot the convolution of two sequence.
Theory: Convolution is a fundamental operation in digital signal processing used
to combine two sequences to form a third sequence. Convolution helps in
determining the output of a system when an input signal and the system's
impulse response are known. It’s widely used in digital filtering, where the input
signal is convolved with a filter's impulse response to produce the filtered output.
This operation essentially involves the sliding of one sequence over another and
computing the weighted sum at each step. The convolution of two discrete-time
sequences x[n]x[n] and h[n]h[n] is denoted as y[n]y[n] and is given by the
equation:

y [ n]= ∑ x [ k ] . h[n−k ]
k=−∞

Code:
x=[1 2 4 5]; end
h=[2 3 1]; end
x=input('Enter x: '); disp(y);
h=input('Enter h: '); y1=conv(x,h);
lenx=length(x); disp(y1);
lenh=length(h); stem(x,'Color','r','LineWidth',5);
leny=lenx+lenh-1; hold on;
y=zeros(1,leny); stem(h,'Color','b','LineWidth',3);
for n=1:leny hold on;
for k=1:lenh stem(y,'Color','g','LineWidth',1);
if n-k+1>0 && n-k+1<=lenx hold on;
y(n)=y(n)+x(n-k+1)*h(k); legend('x','h','y');
end hold off;

Prerita Shukla – 23BIT119 1


Digital Signal Processing – 20IC210P

Output:

Conclusion: Convolution in discrete time is a powerful tool that allows combining


signals and analyzing systems. MATLAB provides an efficient and straightforward
way to perform this operation using the conv function.

Prerita Shukla – 23BIT119 2

You might also like