corrcoefΒΆ

corrcoef returns the correlation coefficient. Its square is the coefficient of determination.

rsR = corrcoef(rvX, rvY)

Return Value

rsR is the correlation coefficient in the range -1 to 1.

Parameters

rvX

rvX is a real vector.

rvY

rvY is a real vector.

Example

* R = corrcoef([-2,3,1], [3,5,5])
* R
  0.9177
* R^2
  0.8421

History

Version Description
5.12.0 New

id-201193