function r = tchcorcoef(X,Y)
%
% tchcorcoef - Compute correlation coefficient between vectors
% On input:
%     X: independent variable vector of length n
%     Y: dependent variable vector of length n
% On output:
%     r: correlation coefficient
% Call:
%     r = tchcorcoef(X,Y);
%

r = tchcov(X,Y)/(tchstd(X)*tchstd(Y));
