marcoshuck

Fourier Serie (TD)

Dec 15th, 2016
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.56 KB | None | 0 0
  1. %{
  2. Análisis de Señales y Sistemas - TP Laboratorio Nº 3
  3. Función FSERIED - Grupo 6
  4. Argumentos:
  5.     - x: Señal de entrada
  6.     - n: Variable independiente
  7.     - N: Cantidad de coeficientes a calcular
  8.     - k: Cantidad de coeficientes a calcular
  9. Retorna:
  10.     - ak: Coeficientes de Fourier
  11. Repositorio disponible en: https://github.com/marcoshuck/matlab-tp3-asys
  12. Realizado por Huck Marcos A. y Castelluci Leandro E.
  13. %}
  14.  
  15. function[ak] = FSERIED(x, n, N, k)
  16.     fi = exp(-1i*n*2*pi/N);
  17.     for p=1:length(k)
  18.         ak(p) = 1/N * sum(x.*(fi.^k(p)));
  19.     end
  20. end
Advertisement