% correlation(u,v) computes the correlation of vectors u and v
function cor = correlation(u,v)
   uprime = u - mean(u);
   vprime = v - mean(v);
   cor = dot(uprime/norm(uprime), vprime/norm(vprime));
end
