0% found this document useful (0 votes)
48 views9 pages

Digital Signal Processing Lab Manual Handwritten

This document describes performing overlap-save convolution using the MATLAB command window. It defines the impulse response h and input signal x, divides x into blocks of length L, and convolves each block with h using overlap-save. The result y is displayed. Key steps include inputting signals, zero-padding x for different block lengths, convolving each block with h, and assembling the final output y.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views9 pages

Digital Signal Processing Lab Manual Handwritten

This document describes performing overlap-save convolution using the MATLAB command window. It defines the impulse response h and input signal x, divides x into blocks of length L, and convolves each block with h using overlap-save. The result y is displayed. Key steps include inputting signals, zero-padding x for different block lengths, convolving each block with h, and assembling the final output y.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Lab

Dipial kigral Bocening


(0 fontorn Convo lotion uaiy onetlap
method,
X(n) = {3,-, 0, 1,3, 2, 0, 2,2 , 25
M=3
N= 2^23

A() tn) t y )
N= M+l-l => L=
| = N-MI = 8-3+|=6

geres
3, 2, 02, 2, l so,os
Ltz fnpu t[ "Eiter the impuhe neponsa ; "}:
Lengt (a);
vE input ("Ener the input ceg ben te "3.
len-x

Kesos (4, m), ,

elie if

eue
|Zeres (, m12, X, znB(, 2* (2-J))

toes ( , m) ;

x t(K:) - (2, colcolt m-1):


n-);
J.t (K, :) 5 Cncular- Con (-temp (k, ),h,
J+

end

Auneh'on
tun ction CAJ= G culor. Conv (hyn
eno!
): makp (k, stem
(3,sUbplot
2) 2,
Stem(n;x)
Vongi 1,4) (3,Qubplot
(*e): age leXe ang
Magxk
N); (*, ft =Xk
"J:Seguenre
("erks
the input NE
ijut ("Eter Input
He
signal the of the
rongeinputl(nter n=
Coe: SoUTe
signal
a PAT peform To Am
:
LAB DSP (2029 |8/1o
3ubplot (3,(3)
SHm (k, ange e);
ite ('Angle of Xe');
Cind &ptt the PAT the
fooung nial
fo,2, 3,
Consluthion waing.Onlap Saue
9 Perform
methd.,
clc

input ("Ester the 'impbse response.= ");


hi =
Mlength (h!);,
X=, hput("Enter the input
Qen
");

X=(zrg(,M) X, 2or0s (2, 2)7:

X=(zeros (2, ma), X, zoras

ziroS (Ilr4)7:
floor

K--temp (k, :) X , ol: ol+N-1):


y.temp(k, :) -Conv(X-temp(k, :), 4)

disploy (a ) Veicd

display (X tenp )

splay (9)

Cy 2, 2, 3 2-3)})2, -17 x
lack length=
overlap_sm.mx +
MATLAB Drivelovertap sm.m
6
X- input("Enter the input Signal =")
7 Lx- length (*);
3 - input ("Enter the length of input : ");
10 N= L-1;
13 od(len x, L);
17
13 if z 0
14
15
X (zeros(1, M-1), x, zeros(1, )];
else if z == 1
16 X [zeros(1, M-1), x, zeros(1, L-1));
17 else
18 X= [zeros(1, M-1), x, zeros(1, 2L-3)];
end
end
1 h = [h1,zeros(1, L-1)];
2 NX length(0);
row floor (N_x/L);
y = ();
for k 1:row
col = (k-1)°L+1;

Xtenp (k, :) = X(1, col: col+N-1);


Ytenp(k, :) = cconv(x_temp(k, :), h); I
Y= ly, y_temp(k, L:N)];
end
display (*)
display (h)
display (x temp)
display (y_temp)
display (y)
matlab.mathworks.com
HOME PLOTS APPS EDITOR PUBLISH Search (Crl+Shift+Space)
RLE VERSONS

Code Issues Section Break


Open Save Go To Find Relactor Run and Advance
Run Step Stop
Bookmark Debugger Section Run to End
Run

FILE NAVIGATE cODE ANALYZE SECTION RUN


IMATUAB Drive
overlap sm.m
Command Window

New to MATLAB? Seo resources for Geting Statod.


Enter the i pulse respons =
(1,2,1,1)
Enter the input Signal
(1,2,-1,2,3,-2,-3, -1,1,1,2, -1]
Enter the length of input =
4

2-1

x_tenp

2
-1
-1

Y_tenp

-0.0000 0.0000 -0.0000 1.0000 .e000 4.0000 3.0000 5.0000 1.0000 2.0009 .0000 -0.000e -0.0000
2.0000 3.0000 2.0000 8.0000 5.0000 -2.0000 -6.0000 -7.0000 -4.0000 -1.0000 0.0000
-2.0000 -7.0009 -9.0000 -6.0000 -1.0000 4.0000 5.0009 1.0000 1.0000 -1.0000 -0.0000
1.0000 4.0000 4.0000 1.0000 1.0000 -1.0000 -0.0000 0.0000 -0.0000 e.0000

You might also like