Serie de Fourier de una onda triangular.

  1. import pylab
  2. import numpy as np
  3. #Reconstruccion
  4. A=1.
  5. a0=1./2
  6. t=np.linspace(-3,3,10000)
  7. s_per=0
  8. for k in range(-30,30):
  9. #ak=((-1)^k-1)*A/(np.pi^2*k^2)
  10. if k!=0:
  11. s_per=s_per+((-1)**k-1)*A/(np.pi**2*k**2)*np.exp(1j*k*2*np.pi*t)
  12. s_per=s_per+a0
  13. pylab.plot(t,s_per), pylab.show()
  14. pylab.grid(True)

No hay comentarios.:

Publicar un comentario

Related Posts Plugin for WordPress, Blogger...