Skip to contents

Real cepstrum \(c[n] = \mathrm{IFFT}(\log |\mathrm{FFT}(x)|)\). Useful for pitch-period estimation and any analysis where the multiplicative magnitude structure of the spectrum is best handled additively in the quefrency domain.

Usage

cepst(x, n_fft = NULL)

Arguments

x

Numeric vector (1-D signal).

n_fft

FFT length (default: next power of 2 \(\geq\) length(x)).

Value

List with filtered (real cepstral coefficients), name, fs, n_samples, and extra (quefrency, n_fft).

Details

Reference: Rangayyan, R.M. (2015) Biomedical Signal Analysis, 2nd ed., Wiley/IEEE Press, chapter on cepstral analysis.

Examples

# \donttest{
set.seed(1)
x <- sin(2 * pi * 5 * seq(0, 1, length.out = 512))
res <- cepst(x)
length(res$filtered)
#> [1] 512
# }