view _FullBNT/KPMtools/centeringMatrix.m @ 9:4ea6619cb3f5 tip

removed log files
author matthiasm
date Fri, 11 Apr 2014 15:55:11 +0100
parents b5b38998ef3b
children
line wrap: on
line source
N = 3;
x = rand(N,2); % each row is a feature vector 
m = mean(x,1);
xc = x-repmat(m, N, 1);

C = eye(N) - (1/N)*ones(N,N);
xc2 = C*x;
assert(approxeq(xc, xc2))