.. highlightlang:: us .. _corrcoef: corrcoef ======== .. index:: corrcoef .. us.tag corrcoef ENGLISH New5120 :ref:`corrcoef` returns the correlation coefficient. Its square is the coefficient of determination. .. function:: rsR = corrcoef(rvX, rvY) .. us.return **Return Value** *rsR* is the correlation coefficient in the range -1 to 1. .. us.params **Parameters** .. uparam:: rvX *rvX* is a real vector. .. uparam:: rvY *rvY* is a real vector. .. us.example **Example** :: * R = corrcoef([-2,3,1], [3,5,5]) * R 0.9177 * R^2 0.8421 .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.12.0 - New .. seealso:: :ref:`overview-mathematic`, :ref:`sum`, :ref:`mean`, :ref:`std`, :ref:`cov` :sub:`id-201193`