Vector::Convolve Method

TVec *Convolve(TVec *X, TVec *H) const;

Single-rate finite, linear convolution of two sequences.

#NameTypeDescription
1XTVec *
2HTVec *
Remarks:

Calculate the single-rate finite, linear convolution of two sequences. The results are stored in the calling vector. The argument names X and H are chosen to suggest FIR filtering. The result of the convolution is defined as follows:

y[n]=k=0H.Length1H[k]X[nk],0n<X.Length+H.Length1y[n]=\sum _{k=0} ^{\text{H.Length}-1} H[k]\cdot X[n-k] \quad , \quad 0\leq n < \text{X.Length}+\text{H.Length}-1

This finite-length convolution is related to infinite-length by:

x[n]={X[n]0n<X.Length0otherwiseh[n]={H[n]0n<X.Length0otherwisey[n]=x[n]h[n]\begin{aligned} x'[n] &= \begin{cases} X[n] & 0\leq n < \text{X.Length} \\ 0 & \text{otherwise}\end{cases} \\ h'[n] &= \begin{cases} H[n] & 0\leq n < \text{X.Length} \\ 0 & \text{otherwise}\end{cases} \\ y'[n] &= x'[n] h'[n] \end{aligned}

In the above equations, X'[n] and h'[n] are the zero-padded (infinite-length) versions of X[n] and h[n]; y'[n] is the infinite-length output version of y[n]. Then y'[n] is zero everywhere except over:

y[n]=y[n]0n<X.Length+H.Length1y[n]=y'[n] \quad 0\leq n < \text{X.Length}+\text{H.Length}-1
See Also: Vector::FFT, Vector::AutoCorrNormal, Vector::AutoCorrBiased, Vector::AutoCorrUnBiased
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler