xcorr2 {gsignal} | R Documentation |
2-D cross-correlation
Description
Compute the 2D cross-correlation of matrices a
and b
.
Usage
xcorr2(a, b = a, scale = c("none", "biased", "unbiased", "coeff"))
Arguments
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:
|
Details
If b
is not specified, computes autocorrelation of a
,
i.e., same as xcorr2 (a, a)
.
Value
2-D cross-correlation or autocorrelation matrix, returned as a matrix
Author(s)
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.
See Also
Examples
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)