-
Notifications
You must be signed in to change notification settings - Fork 0
signal.Goertzel.Function.goertzelSingle
Christian d'Heureuse edited this page Jun 7, 2026
·
2 revisions
dsp-collection / signal/Goertzel / goertzelSingle
function goertzelSingle(x, relativeFrequency): MutableComplex;Defined in: signal/Goertzel.ts:26
Computes the DFT on an array of real numbers for a single frequency.
ArrayLike<number>
The input values (samples).
number
A frequency relative to x.length.
It represents the number of sinusoidal oscillations within x
and is normally an integer within the range 0 (for DC) to Math.floor((x.length - 1) / 2).
The absolute frequency is relativeFrequency * samplingRate / x.length.
A complex number that corresponds to the amplitude and phase of a sinusoidal frequency component.
The amplitude can be normalized by mutliplying 1 / x.length for DC and 2 / x.length
for frequencies > 0 and < x.length / 2.