Qu

vanicek

Builtin index · Signal processing

result = vanicek(t, x, freqs)

Input: t, x, freqs · Output: result

What it is

t is a length-N vector of sample times (need not be uniformly spaced); x is the matching length-N vector of samples; freqs is a length-M vector of frequencies (Hz) to evaluate.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = vanicek(t, x, freqs)
t vectort is a length-N vector of sample times (need not be uniformly spaced).
x vectorx is the matching length-N vector of samples.
freqs vectorfreqs is a length-M vector of frequencies (Hz) to evaluate.
goertzel —which all assume uniform sampling
Returns a length-M real vector, the power spectrum at each requested frequency — Vanicek's Least-Squares Spectral Analysis, valid for unevenly-sampled (t, x) where fft/dft/goertzel (which all assume uniform sampling) don't apply.

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

  power = vanicek(t, x, [1, 3, 5, 8, 12])   # t need not be evenly spaced

from numerics-dsp

How it works

vanicek(t, x, freqs) — Vanicek's Least-Squares Spectral Analysis: a power spectrum at the requested freqs, valid for unevenly-sampled (t, x) where fft/dft/goertzel (all of which assume uniform sampling) don't apply.

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.