Signal & System Lab Exp No-02
AIM:-
Write a program to compute Convolution of non causal sequence.
x(n)={1,2,3,1} & h(n)={1,2,1,-1}
↑ ↑
SOFTWARE REQUIRED:-
MATLAB SOFTWARE.
PROGRAM:-
>> x=[1,2,3,1];nx=[0:3];
>> h=[1,2,1,-1];nh=[-1:2];
>> nyb=nx(1)+ nh(1);
>> nye=nx(length(x)) + nh(length(h));
>> ny=[nyb:nye];
>> y=conv(x,h)
>> stem(ny,y);
RESULT: -
y= 1 4 8 8 3 -2 -1
↑
Department of Electronics & Communication
Signal & System Lab Exp No-02
Plot of resultant Convolution y(n)=x(n)*h(n)
Department of Electronics & Communication