| Image Processing Toolbox | Search  Help Desk |
| corr2 | See Also |
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

= mean2(A), and
= mean2(B).
See Also
std2
corrcoef in the online MATLAB Function Reference