/*
* fourier.cpp
* FourierTransform
*
* Created by RJ Linton on 4/28/09.
* Copyright 2009 RJ Linton. All rights reserved.
*
*/
#include "fourier.h"
using namespace std;
complex<double> DFT(double functValue[], int compNum, int size){
complex<double> z1;
complex<double> z2;
double omega;
omega = -2*PI*compNum/size;
for(int n = 0; size > n; n ++){
z1 = cos(omega*n)functValue[n];
z2 = sin(omega*n)functValue[n];
}
complex<double> component = z1 + z2;
return(component);
}