xcorr2 | R Documentation |
Compute the 2D cross-correlation of matrices a
and b
.
xcorr2(a, b = a, scale = c("none", "biased", "unbiased", "coeff"))
a |
Input matrix, coerced to numeric. Must not be missing. |
b |
Input matrix, coerced to numeric. Default: |
scale |
Character string. Specifies the type of scaling applied to the correlation matrix. matched to one of:
|
If b
is not specified, computes autocorrelation of a
,
i.e., same as xcorr2 (a, a)
.
2-D cross-correlation or autocorrelation matrix, returned as a matrix
Dave Cogdell, cogdelld@asme.org,
Paul Kienzle, pkienzle@users.sf.net,
Carne Draug, carandraug+dev@gmail.com.
Conversion to R by Geert van Boxtel, G.J.M.vanBoxtel@gmail.com.
conv2
, xcorr
.
m1 <- matrix(c(17, 24, 1, 8, 15,
23, 5, 7, 14, 16,
4, 6, 13, 20, 22,
10, 12, 19, 21, 3,
11, 18, 25, 2, 9), 5, 5, byrow = TRUE)
m2 <- matrix(c(8, 1, 6,
3, 5, 7,
4, 9, 2), 3, 3, byrow = TRUE)
R <- xcorr2(m1, m2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.