Home > freetb4matlab > statistics > base > corrcoef.m

corrcoef

PURPOSE ^

% Compute correlation.

SYNOPSIS ^

function retval = corrcoef (x, y)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} corrcoef (@var{x}, @var{y})
% Compute correlation.
%
% If each row of @var{x} and @var{y} is an observation and each column is
% a variable, the (@var{i}, @var{j})-th entry of
% @code{corrcoef (@var{x}, @var{y})} is the correlation between the
% @var{i}-th variable in @var{x} and the @var{j}-th variable in @var{y}.
%
% @tex
% $$
% {\rm corrcoef}(x,y) = {{\rm cov}(x,y) \over {\rm std}(x) {\rm std}(y)}
% $$
% @end tex
% @ifnottex
% @example
% corrcoef(x,y) = cov(x,y)/(std(x)*std(y))
% @end example
% @end ifnottex
%
% If called with one argument, compute @code{corrcoef (@var{x}, @var{x})}.
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003