function  [ outKernelCos] = getCosineKernel(inMat)

% calculate the cosine kernel given the inMat
% input : inMat: p x n
% output : outKernelCos : n x n

% centerize
% inMat = inMat - repmat(mean(inMat, 2), 1, size(inMat, 2));
outKernelCos = abs(1 - squareform(pdist(inMat', 'cosine')));

end


