I am trying to implement Discrete Fourier Transform (by definition, in quadratic time).
I wrote this http://jsfiddle.net/uunsm/12/
My result function really goes through discrete points, but it is too "wavy".
When I inserted a sine wave:
var nums = [0.000, 0.707, 1.000, 0.707, 0.000, -0.707, -1.000, -0.707]
I was expecting to get a smooth sine, but again, there are too many "waves". Am I doing anything wrong?
BTW. I found this implementation http://home.fuse.net/clymer/graphs/dft.html which is much smoother. Is it still Fourier transform? Where can I find any info about that algorithm?