corr2 - 2-D correlation coefficient

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 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

std2

corrcoef in the MATLAB® Function Reference

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS