N step fft in D language

David Nadlinger code at klickverbot.at
Sun Sep 15 14:48:38 PDT 2013


On Sunday, 15 September 2013 at 20:58:54 UTC, Kadir Erdem Demir 
wrote:
> I believe I am well aware of the things which are explained in 
> the link. There is a sentence in link which says  : "The first 
> bin in the FFT is DC (0 Hz), the second bin is Fs / N, where Fs 
> is the sample rate and N is the size of the FFT."
>
> My question how can I determine the "N" which is the size of 
> FFT ?
> In fftw library one can define N like :
> fftw_create_plan(N, FFTW_FORWARD, FFTW_ESTIMATE);
> In D do we have a way to do that ?

I am not aware of the details of that particular FFTW function, 
but mathematically, the result of the Fourier transform of a 
given vector is _always_ a vector of the same size. Thus, I guess 
using FFTW in that way just amounts to the equivalent of 
fft(timeDomainAmplitudeVal[0 .. N]).

David


More information about the Digitalmars-d-learn mailing list