Skip to contents

Geometric-to-arithmetic mean ratio of the positive PSD bins; values near 1 indicate a white spectrum, near 0 indicate tonal concentration.

Usage

morie_dsp_spectral_flatness(psd)

Arguments

psd

PSD vector.

Value

Scalar in [0, 1].

References

Rangayyan & Krishnan (2015), Ch. 6, sec. 6.7.

Examples

uni <- rep(1, 64)
morie_dsp_spectral_flatness(uni)
#> [1] 1