Fourier transform with python
问题 I have a set of data. It is obviously have some periodic nature. I want to find out what frequency it has by using the fourier transformation and plot it out. Here is a shot of mine, but it seems not so good. This is the corresponding code, I don't konw why it fails: import numpy from pylab import * from scipy.fftpack import fft,fftfreq import matplotlib.pyplot as plt dataset = numpy.genfromtxt(fname='data.txt',skip_header=1) t = dataset[:,0] signal = dataset[:,1] npts=len(t) FFT = abs(fft