How to reconstruct periodic signal from numpy.fft.fft using sines, cosines, and a Fourier design matrix?
I’m creating a periodic time-domain signal by summing a series of sine waves with some amplitude, frequency, and phase. After performing a FFT with NumPy (reference), I construct a vector of the Fourier coefficients in the sine/cosine basis. Then I define a Fourier design matrix with sine/cosine elements evaluated at the different times and frequencies as shown below,