This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fourier.py | |
# This source contains below: | |
# * Discrete Fourier Transform (DFT) | |
# * Fast Fourier Transform (FFT) | |
# * Discrete Co-sine Transform Type-II (DCT2) | |
import math | |
def dft(samples): | |
n = len(samples) |