Skip to main content

dct_i

Function dct_i 

Source
pub fn dct_i(xs: &[f64]) -> Vec<f64>
Expand description

Compute the DCT-I of a real signal.

X[k] = x[0] + (-1)^k x[N-1] + 2 Σ_{n=1}^{N-2} x[n] cos(π n k / (N-1))

The DCT-I is its own inverse (when normalized).