문제

I think I get wrong result with a very simple example, so please help me point out what my mistake is:

I want to con-volute [1,1] with [1,1], so the correct result would be [1,2,1].

Now I do it using Fourier transform, [1,1] would become [2,0]. [2,0] point.wise.multiplies.with [2,0] would be [4,0], then inverse fft [4,0] and finally get [2,2]. Why didn't I get correct result?

도움이 되었습니까?

해결책

For a linear fast convolution, you need to zero pad both your input vectors and use a longer FFT (of a length at least the sum of the two input vector lengths - 1), so that the circular convolution results don't wrap around an mix up the result.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top