Goertzel Algorithm (C) - LiteratePrograms
Goertzel Algorithm (C) - LiteratePrograms
The Goertzelalgorithmis a digital signalprocessing(DSP) techniquefor identifyingfrequencycomponentsof a signal, publishedby Dr. GeraldGoertzelin 1958. While the generalFast Fouriertransform(FFT) algorithmcomputesevenly across the bandwidthof the
incomingsignal, the Goertzelalgorithmlooks at specific, predeterminedpoints. For moreinformationsee the Wikipediaarticle (http://en.wikipedia.org/wiki/Goertzel_ algorithm) .
Main algorithm
<<goertzel>>=
float goertzel(float freq, int size, const float x[])
{
int i;
float coeff;
float s, s_prev1 = 0.0f, s_prev2 = 0.0f;
<<goertzel.c>>=
#include <math.h>
goertzel
Category: Digitalsignalprocessing
Privacy policy
About LiteratePrograms
Disclaimers