1-D or 2-D convolution
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.
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')
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.