conv | R Documentation |
Compute convolution function using FFT, similar to 'conv'
in matlab
conv(u, v, shape = c("same", "full"))
u |
numerical vector |
v |
numerical vector, don't need to have the same length as |
shape |
if 'same', return central part of the convolution and has the same size as |
a vector of convolution, as specified by shape.
Matlab document on 'conv'
: https://www.mathworks.com/help/matlab/ref/conv.html
u = c(-1,2,3,-2,0,1,2)
v = c(2,4,-1,1)
w = conv(u,v,'same')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.