- labels: --> Documentation
- status: open --> closed
In the last example under the documentation for fft
the code as written does not produce the output listed. The problem
appears to be that the signs on the sin components are wrong.
If one replaces the line:
(%i17) f(j) := sum (a[k]*cos(2*%pi*j*k/n) + b[k]*sin(2*%pi*j*k/n), k, 0, n/2) $
with
(%i17) f(j) := sum (a[k]*cos(-2*%pi*j*k/n) + b[k]*sin(-2*%pi*j*k/n), k, 0, n/2) $
The listed output is reproduced.
This is the formula used in rtest_fft.mac.
I have attached a patch.
Fixed by commit 66cb7721532 (applied the patch). Closing this report as fixed.
Log in to post a comment.