Discrete Fourier Transform (DFT)
This is a basic Matlab implementation of the Discrete Fourier Transform also known as DFT. The function receives as input a discrete-time signal (a sequence of N real numbers)and returns the frequency spectrum (a sequence of N complex numbers).
; % defining a 1xN sequence with all the elements equals to zero.
%*************THIS IS THE DFT IMPLEMENTATION**************
%For each value of k, the Summatory function is computed over the interval 0<n<N-1.
%NOTE: You may skip the use of for-loops by defining k and n as two N-points sequences. This is:
% k=0:N-1; n=0:N-1;
%The DFT is now computed in matrix form (as a matrix multiplication of the N-points Fourier Matrix and the discrete-time sequence x).
Rate this code snippet:
posted by Miguel De Jesus
Miguel De Jesus possessed a BS in Electrical Engineering. He also pursued graduate studies obtaining a MSEE with specialization in Digital Signal Processing from the Polytechnic University of Puerto Rico.
He has experience in research and development in several DSP areas such as time/frequency analysis, array processing, and parallel processing.