Take the 2-minute tour ×  I am new to Python. I intend to do
Fourier Transform to an array of discrete points, (time,
acceleration), and plot the result out.  I copy and paste the
sample FFT code, and modify accordingly.  Please see codes:
import numpy as np import matplotlib.pyplot as plt  # Load the
.txt file in myData = np.loadtxt('twenty_z_up.txt')  # Extract
the time and acceleration columns time = copy(myData[:,0])  #
Extract the acceleration columns zAcc = copy(myData[:,3])  t =
np.arange(10080) sp = np.fft.fft(zAcc) freq =
np.fft.fftfreq(t.shape[-1]) plt.plot(freq, sp.real)  myData is a
rectangular matrix with 10080 rows and 10 columns.  Thus, zAcc
is the row3 extracted from the matrix.  In the plot drawn by
Spyder, most of the harmonics concentrated around 0. They are
all extremely small.  But my data are actually the accelerations
of the phone carried by a walking person (including the
gravity). So I expect the most significant harmonic happens
around 2Hz.  Why is the graph non-sense?  Thanks in ad