ASSIGNMENT 1: Linear Convolution and De-Convolution
ASSIGNMENT 1: Linear Convolution and De-Convolution
ASSIGNMENT 1: Linear Convolution and De-Convolution
% Linear Convolution
x=[3 11 7 0 -1 4 2];
% input signal
h=[2 3 0 -5 2 1];
% impulse response
nx=[-3:3];
% beginning point and end point of x(n)
nh=[-1:4];
% beginning point and end point of h(n)
nyb=nx(1)+nh(1);
% beginning point of y(n)
nye=nx(length(x))+nh(length(h));
% end point of y(n)
ny=[nyb:nye]
% beginning point and end point of y(n)
y=conv(x,h)
% CONV(A, B) convolves vectors A and B.
% The resulting vector is length LENGTH(A)+LENGTH(B) - 1.
(1)
(2)
(3)
0<n<4