Professional Documents
Culture Documents
Lab - 6
Lab - 6
Lab - 6
L=(-X_start)+(-H_start):length(Hin)-(H_start+1)+length(Xin)-(X_start+1);
cnv =zeros(1,length(L));
for i=1:length(Xin)
cnv=cnv+temp;
end
subplot(411);stem(Xin);title('x[n]')
subplot(412);stem(Hin);title('h[n]')
subplot(413);stem(cnv);title('y[n] user defined')
default=conv(Xin,Hin);
subplot(414);stem(cnv);title('y[n] default')
if(cnv)==default
Matlab’s Function:
b) If x[n] starts from -1 and h[n] starts from -2 then what will be the result
of convolution using ‘my_conv’ and ‘conv’?
With my_conv: