0

I get the basic idea of a continuous Fourier transform and I am a little fuzzy with a discrete Fourier transform and hazier still on the fast Fourier transform. I want to know how to compute and interpret the fast Fourier transform (FFT) of some function in maxima. For example, how would I compute the FFT of sin(x)? I know how to do this in MATLAB, but I am not sure how to do it in maxima.

1 Answers1

1

Well, there is a built-in fast Fourier transform function: see 'fft'.

'fft' is only for numerical data. Maybe you want a function which works for symbolic data as well. It is easy to write an ordinary (not fast) discrete Fourier transform as a summation, something like: (1/n) sum(y[k]*exp(2*%pi*%i*j*k/n) for the j-th element. (Formula may be wrong, I am working from memory.)

If you want a fast Fourier transform for symbolic data, you will need to work from a published algorithm. (There are many books which have FFT algorithms in them.) Just write the algorithm in Maxima and operations will automatically be symbolic.

Robert Dodier
  • 16,905
  • 2
  • 31
  • 48
  • I do not mind using numerical data as that is how I would do it in MATLAB. My problem is that I don't know how to do it numerically in maxima. – Antolini Rubicon Jan 07 '13 at 12:49
  • OK, for numerical data, use the 'fft' function in Maxima. Enter '? fft' at the input prompt to get documentation. – Robert Dodier Jan 08 '13 at 02:53
  • I figured I should update this. I managed to get it to work by using bits and pieces of qfft.mac (not part of standard maxima). I modified it enough to get it to work the way I need. Thanks. – Antolini Rubicon Jan 15 '13 at 16:39