python - Fourier series period from fft? -


i have 2 arrays of discrete real data, x , y. x has integers along regular interval, , y ranges 0 1. suspect cyclicality in y, i'm applying fourier transform , plotting results , real data follows:

fx = np.fft.fft(x) plt.plot(x, fx, color='red') plt.scatter(x, y, color='blue') 

the problem don't understand fft(x) returns. see it's array of complex numbers represent coefficients of series, don't understand how extract period best represents cycles of y. also, if elements of fx coefficients, plotting here? why length of fx equal length of x? fft assume period length of x?


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -