wconv | R Documentation |
Compute the one- or two-dimensional convolution of two vectors or matrices.
wconv(
type = c("1d", "2d", "row", "column"),
a,
b,
shape = c("full", "same", "valid")
)
type |
Numeric or character, specifies the type of convolution to perform:
|
a , b |
Input vectors or matrices, coerced to numeric. |
shape |
Subsection of convolution, partially matched to:
|
Convolution of input matrices, returned as a matrix or a vector.
Lukas Reichlin, lukas.reichlin@gmail.com.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.
conv
a <- matrix(1:16, 4, 4)
b <- matrix(1:9, 3,3)
w <- wconv('2', a, b)
w <- wconv('1', a, b, 'same')
w <- wconv('r', a, b)
w <- wconv('r', a, c(0,1), 'same')
w <- wconv('c', a, c(0,1), 'valid')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.