For the way you proceed, the result is expected. What you're plotting is s (which has 320 doubles) along with conv_out, which has 330 elements (because the convolution's result is going to have one less than the sum of number of elements per vectors that you convolve, i.e. 320 and 11).
Since you're plotting both vectors against the position of the elements, is quite normal that the conv_out is shifted compared to s (because they have different lengths). What you need is to correctly choose the x axis for plotting. So, try to figure what is the correct x axis.
Asked in February 2016Viewed 2,249 timesVoted 12Answered 1 times