get-the-solution

discret convolution works!

x: h:   Share Link

xx<00x>0x<0012345x>0
x[n]000h[n]01-100-110

See numpy.convolve for reference

This returns the convolution at each point of overlap, with an output shape of (N+M-1,). At the end-points of the convolution, the signals do not overlap completely, and boundary effects may be seen. x*h=sum(x[m]*h[n-m])

conv1([0] , [1,-1,0,0,-1,1])=[0,0,0,0,0,0]


y[0]=x[0]*h[0](0) =0

y[1]=x[0]*h[1](0) + x[1]*h[0](0) =0

y[2]=x[0]*h[2](0) + x[1]*h[1](0) + x[2]*h[0](0) =0

y[3]=x[0]*h[3](0) + x[1]*h[2](0) + x[2]*h[1](0) + x[3]*h[0](0) =0

y[4]=x[0]*h[4](0) + x[1]*h[3](0) + x[2]*h[2](0) + x[3]*h[1](0) + x[4]*h[0](0) =0

y[5]=x[0]*h[5](0) + x[1]*h[4](0) + x[2]*h[3](0) + x[3]*h[2](0) + x[4]*h[1](0) + x[5]*h[0](0) =0