| Image Processing Toolbox | ![]() |
Compute the two-dimensional correlation coefficient between two matrices
Syntax
r = corr2(A,B)
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 of class double or of any integer class. r is a scalar of class double.
Algorithm
corr2 computes the correlation coefficient using
where
= mean2(A), and
= mean2(B).
See Also
corrcoef in the MATLAB Function Reference
| convn | dct2 | ![]() |