The conventional Goertzel Algorithm can be used to compute individual DFT coefficients. In case we need to compute some values of DTFT (that means, non-integer multiples of the fundamental frequency), slight modification must be done.
There are two files: the conventional and generalized Goertzel algorithm. No toolboxes needed.
The algorithm and its derivation is described in the article accesible at
Pavel Rajmic (2020). Generalized Goertzel algorithm (https://www.mathworks.com/matlabcentral/fileexchange/35103-generalized-goertzel-algorithm), MATLAB Central File Exchange. Retrieved .
In help to this function, we state that
... the 'indices' can be non-integer valued in the range 0 to N−1, where N is the length of X.
Actually, the interval from N−1 to N should be included as well!
Hi, Does it take of windowing the data to reduce spectral leakage?
Hi Pavel Rajmic,
Nice code. I want this for n-dimensions. Is there a way to extend this code to multiple, or general n-dimensions. I am extremely interested in this, and would be very helpful for my application, if it can be extended to n-dimensions.
very useful for detecting frequencies that are not integer multiples of 1/N
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!