Description Usage Arguments Details Value Examples
Computes convolutions of two sequences via Fast Fourier Transform
1 | convJU(x, y)
|
x |
numeric sequence |
y |
numeric sequence, of equal or shorter length than |
Use the Fast Fourier Transform to compute convolutions of two sequences.
If sequences are of different length, the shorter one get a suffix of 0's.
Following convention of stats::convolve
function, if
r <- convolve(x, y, type = "open")
and
n <- length(x)
,
m <- length(y)
,
then
r[k] = ∑_i x[k-m+i] \cdot y[i])
where the sum is over all valid indices i.
FFT formulation is useful for implementing an efficient numerical convolution: the standard convolution algorithm has quadratic computational complexity. From convolution theorem, the complexity of the convolution can be reduced from O(n^{2}) to O(n\log n) with fast Fourier transform.
numeric sequence
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.