![]() |
VOOZH | about |
The Discrete Fourier Transform (DFT) and its Inverse (IDFT) are core techniques in digital signal processing. They convert signals between the time or spatial domain and the frequency domain, revealing frequency components in data. MATLAB offers useful tools for implementing and visualizing these transforms.
The standard equations which define how the Discrete Fourier Transform and the Inverse convert a signal from the time domain to the frequency domain and vice versa are as follows:
DFT: The Discrete Fourier Transform (DFT) of a sequence x(n) of length N is:
Where:
IDFT: The Inverse Discrete Fourier Transform (IDFT) reconstructs the original sequence:
Where:
When we take the twiddle factors as components of a matrix, it becomes much easier to calculate the DFT and IDFT. Therefore, if our frequency-domain signal is a single-row matrix represented by and the time-domain signal is also a single-row matrix represented as
👁 ImageWith this interpretation, all we require to do is create two arrays upon which we shall issue a matrix multiplication to obtain the output. The output matrix will always be a Nx1 order matrix since we take a single-row matrix as our input signal ( or ). This is essentially a vector which we may transpose to a horizontal matrix for our convenience.
Output:
>> Input sequence: [1 4 9 16 25 36 49 64 81] >> Enter the number of points: 9
stem plots which are standard for discrete data.>> Enter the input sequence: [1 2 3 4 5 9 8 7 6 5]
exp (+1i*...) to inverse the frequency components.stem for a clear, discrete view.