fftconv | R Documentation |
Convolve two vectors using the FFT for computation.
fftconv(x, y, n = NULL)
x , y |
input vectors. |
n |
FFT length, specified as a positive integer. The FFT size must be an
even power of 2 and must be greater than or equal to the length of
|
The computation uses the FFT by calling the function fftfilt
. If the
optional argument n
is specified, an n
-point overlap-add FFT is
used.
Convoluted signal, specified as a a vector of length equal to
length (x) + length (y) - 1
. If x
and y
are the
coefficient vectors of two polynomials, the returned value is the
coefficient vector of the product polynomial.
Kurt Hornik, Kurt.Hornik@wu-wien.ac.at,
adapted by John W. Eaton.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.
conv
, conv2
u <- rep(1L, 3)
v <- c(1, 1, 0, 0, 0, 1, 1)
w1 <- conv(u, v) # time-domain convolution
w2 <- fftconv(u, v) # frequency domain convolution
all.equal(w1, w2) # same results
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.