Can I use fft of Matlab in this case?

64 Views Asked by At

fft is a function for Fast Fourier transform. In Matlab help document, Y=fft(x), $\rightarrow$ $X(k)=\sum\limits_{j=1}^Nx(j)w_N^{(j-1)(k-1)}$ where $w_N=e^{(-2\pi i/N)}$ and $N$ is the length of $x$.

In my case x is a function of $\theta$ having periods $2\pi$.So $w_N$ should be $e^{(-2\pi i/2\pi)}$,not the length of x.

Thus, I should write a code for my case. I cannot use Matlab fft.

1

There are 1 best solutions below

0
On BEST ANSWER

FFT is an algorithm for taking discrete Fourier transform, which is the transform of a function defined on a finite set: $0,1,\dots,N-1$. The formula for its coefficients involves summation.

If you have something of period $2\pi$, you are probably thinking of Fourier series. The formula for its coefficients involves integration, which can be implemented numerically in various ways, including Matlab's built-in integral routine.