The Discrete Fourier transformation (DFT) for a given frequency.
Calculates the Discrete Fourier transformation (DFT) for a given frequency. Goertz returns the DFT at the Frequency. Each value of the DFT computed by the Goertzel algorithm takes 2N+2 real multiplications and 4N real additions. FFT computes the DFT with N*log2(N) of real multiplications and additions.
DFT of a single frequency.
uses MtxExpr, Math387, MtxVec, SignalUtils, MtxVecTee, MtxVecEdit; procedure TForm1.Button1Click(Sender: TObject); var a: Vector; begin Tone(a,256,5.5/256,0,12.53); //generate a tone //And now detect the amplitude at non-integer frequency: ShowMessage('Amplitude = ' + SampleToStr(CAbs(Goertz(a,5.5/256))/128)); end;
#include "MtxExpr.hpp" #include "MtxVecEdit.hpp" #include "MtxVecTee.hpp" #include "SignalUtils.hpp" void __fastcall TForm1::BitBtn1Click(TObject *Sender) { sVector a; Tone(a,256,5.5/256,0,12.53); //generate a tone with Amplt = 12.53 //And now detect the amplitude at non-integer frequency: ShowMessage("Amplitude = " + SampleToStr(CAbs(Goertz(a,5.5/256))/128)); }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|