% get a simple correlation bvetween two column vectors
% For efficiency, I do not check for like-length or that both are
% columns. All are ASSUMED to be true!

function c = cor4vects(x,y);

xp = x-mean(x);
yp = y-mean(y);
c  = (xp'*yp)/sqrt((xp'*xp)*(yp'*yp));