Commit 0e5a724f6f313bd40018b28e3d0fd8f2d6fcde6d
1 parent
9e2f400e
serie de fourier
Showing
1 changed file
with
14 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,14 @@ |
1 | +import numpy as np | |
2 | +import matplotlib.pyplot as plt | |
3 | +from scipy.fft import fft, ifft | |
4 | +from scipy import signal | |
5 | + | |
6 | +t=np.arange(0,100,0.1) | |
7 | +x= np.cos(2*np.pi*t) | |
8 | +y= fft(x) | |
9 | + | |
10 | + | |
11 | +p= np.linspace(0,1000,1,endpoint=True) | |
12 | +u = signal.square( np.pi*5*p) | |
13 | +e = np.fft.fft(u) | |
14 | +plt.plot(p,e) | ... | ... |