Fourier7

Fourier analysis
import numpy as np import matplotlib.pyplot as plot t=np.arange(0, 6.28, .01); a=np.rint(np.sin(t)) plot.subplot(211) plot.plot(t,a,'bo') plot.xlabel('Time') plot.ylabel('Amplitude') plot.subplot(212) plot.magnitude_spectrum(a,Fs=4) plot.show
 * 1) !/usr/bin/python3