From 0e5a724f6f313bd40018b28e3d0fd8f2d6fcde6d Mon Sep 17 00:00:00 2001 From: mahmoudrabia Date: Fri, 6 Sep 2024 11:36:58 +0200 Subject: [PATCH] serie de fourier --- serie_de_fourier.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+), 0 deletions(-) create mode 100644 serie_de_fourier.py diff --git a/serie_de_fourier.py b/serie_de_fourier.py new file mode 100644 index 0000000..801860d --- /dev/null +++ b/serie_de_fourier.py @@ -0,0 +1,14 @@ +import numpy as np +import matplotlib.pyplot as plt +from scipy.fft import fft, ifft +from scipy import signal + +t=np.arange(0,100,0.1) +x= np.cos(2*np.pi*t) +y= fft(x) + + +p= np.linspace(0,1000,1,endpoint=True) +u = signal.square( np.pi*5*p) +e = np.fft.fft(u) +plt.plot(p,e) -- libgit2 0.21.2