swharden/FftSharp

Filter Creation Off-By-1

Closed this issue ยท 2 comments

window[i] = 0.5 - 0.5 * Math.Cos(2 * Math.PI * i / size);

Shouldn't this line be:
window[i] = 0.5 - 0.5 * Math.Cos(2 * Math.PI * i / (size-1));

Otherwise the window is not symmetric.

Thanks for reporting this @frouwen! In #47 I extensively tested all the window functions against Python/scipy to ensure correctness, making a few small corrections in the process. I'm releasing an updated NuGet package tonight reflecting these changes ๐Ÿ‘ ๐Ÿš€

Awesome! You made some very nice improvements! Your libraries make my life considerably easier. Keep up the good work ๐Ÿ˜„.