What is wrong with my own fft-algorithm?

1 view (last 30 days)
Phillip
Phillip on 11 Jun 2014
Commented: Geoff Hayes on 12 Jun 2014
Hi everyone.
I am trying to write my own fft function. My input is a 1xN array with only real values. N has to be an even number. The output should also be a 1xN array but with N complex values. The function itself works, but I recieve wrong results compared with the Matlab´s fft function. I think the mistake is somewhere between the second for-loop, but I am not sure.
Can anybody give me a hint what might be wrong? Many thanks in advance! ;)
  1 Comment
Geoff Hayes
Geoff Hayes on 12 Jun 2014
Phillip - one problem is that your code returns only real numbers (the cosine and sine calculations have been commented out). You should go back to the paper or textbook that you are using as a guide to implement this algorithm and ensure that you understand what is expected to be coded. Comments in the code would be helpful too (my German is a "little" rusty) for both yourself and the reader.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!