
function [X,y] = sample(n)

d = 10;

y = zeros(n,1);
I = (1:fix(n/2));
y(I)=1;

X = randn(n,d)+repmat(y,1,d)/d;

