rfif: Fast Iterative Filtering (C backend)

View source: R/rfif.R View source: R/fifc.R

rfifR Documentation

Fast Iterative Filtering (C backend)

Description

Decompose a univariate signal into Intrinsic Mode Functions (IMFs) using the vendored C implementation of Fast Iterative Filtering (FIF).

Usage

rfif(x)

Arguments

x

Numeric vector (signal).

Value

A list with components:

  • imfs: numeric matrix with one IMF per row (rows = IMFs; columns = time).

  • residual: numeric vector of length length(x).

  • nimf: integer number of IMFs.

Examples

t <- seq(0, 1, length.out = 1024)
x <- sin(2*pi*5*t) + 0.5*sin(2*pi*20*t)
res <- rfif(x)
recon <- if (res$nimf > 0) colSums(res$imfs) + res$residual else res$residual
max(abs(x - recon))

RFIF documentation built on March 31, 2026, 5:07 p.m.