Processing math: 100%

Direct implementation of the discrete Fourier Transform

Question Q6.7.1

Compare the speed of execution of NumPy's np.fft.fft algorithm and that of the direct implementation of the equation

Fk=n1m=0fmexp(2πimkn),k=0,1,2,,n1

Hints: treat the direct equation as a matrix multiplication (dot product) of an array of n function values (random ones will do) with the n×n array with entries exp(2πimk/n) (m,k=0,1,,n1). Use IPython's %timeit magic.


Solution Q6.7.1