R/buildAnalytic.R

Defines functions .buildAnalytic

# Analytic signal z = c + i Hc of each column (eq-hilbert-analitica): the DFT
# of the column is multiplied by 1 + sgn of the bin frequency
# (eq-hilbert-unilateral). The zero bin and, for an even number of samples, the
# Nyquist bin keep the factor 1, which makes Re z equal the column. The DFT
# implies the periodic extension of the record.
.buildAnalytic <- function(signal) {
    n <- nrow(signal)
    k <- seq_len(n) - 1L
    Factor <- 1 + sign(n - 2 * k) * (k > 0L)
    stats::mvfft(Factor * stats::mvfft(signal), inverse = TRUE) / n
}

Try the xemd package in your browser

Any scripts or data that you put into this service are public.

xemd documentation built on Nov. 9, 2026, 1:09 a.m.