Professional Documents
Culture Documents
Lab Task-3 Digital Signal Processing
Lab Task-3 Digital Signal Processing
Lab Task-3 Digital Signal Processing
DESCRIPTION:
To find the DFT upto 10 points.
Input x(n) is given.
Using Inbuilt command dftmtx
MATLAB CODE:
clc;
clear all;
close all;
n=0:9;
x1=[1 zeros(1,9)];
X1=dftmtx(10)*x1'
x2=[ones(1,10)];
X2=dftmtx(10)*x2'
x3=exp(j*2*pi*n/10);
X3=dftmtx(10)*x3'
x4=cos(2*pi*n/10);
X4=dftmtx(10)*x4'
OUTPUT:
CONCLUSION:
DFT computation is determined up to 10 points and result is verified.
DESCRIPTION:
Input x(n) and response h(n) are given.
To verify Linear convolution using inbuilt command conv(x,h)
and circular convolution using inbuilt command cconv(x,h,n)
L = 6, V = 3
MATLAB CODE:
clc;
clear all;
close all;
x=[1 2 3 4 5 6];
h=[2 1 3 1];
display('Linear convolution=')
conv(x,h)
display('Circular convolution=')
cconv(x,h,6)
OUTPUT:
CONCLUSION:
Linear convolution and circular convolution has been verified.
Output sequence consists of L+V
Cconv = { 27,28,17,25,32 }
The size of cconv sequence is [1 , 6].
Q3.
Parts C. and D.
MATLAB CODE:
clc;
clear all;
close all;
x=[4 5 6 1 2 3 4 5 6];
h=[2 1 3 1];
display('Linear convolution=')
conv(x,h)
display('Circular convolution=')
cconv(x,h,6)
CONCLUSION:
Linear convolution and circular convolution of the extended
sequence has been verified.
There will be only L+V samples in the Output sequence.
The middle part of the linear convolution sequence will be same
as the circular convolution of part b