| Image Processing Toolbox | ![]() |
Compute the two-dimensional correlation coefficient between two matrices
Syntax
Description
r = corr2(A,B) computes the correlation coefficient between A and B, where A and B are matrices or vectors of the same size.
Class Support
A and B can be numeric or logical. The return value, r, is a scalar double.
Algorithm
corr2 computes the correlation coefficient using
where
= mean2(A), and
= mean2(B).
See Also
corrcoef in the MATLAB Function Reference
| convn | cp2tform | ![]() |