n=50;
eps = 3.5;
[x,y] = randomdiskpoint(n);
X = [];
x = x';
y = y';
X(1,:) = x;
X(2,:) = y;
W = ndimweightmatrix(X,eps);
D = diag(sum(W,2));

sized = size(D);
L = D - W  ;                    % unnormalized
Lsym = eye(sized(1)) - D^-0.5 * W * D^-0.5 ;        % symmetric
Lrw = eye(sized(1)) - D^-1 * W ;

[V,D] = eig(Lsym);
colors = [1 0 0; 0 1 0; 0 0 1; 1 1 0; 1 0 1; 0 1 1; 0 0 0];
sized;
indic = zeros(1,sized(1));
col = zeros(sized(1), 3);
for i=1:sized(1)
    if abs(D(i,i)) < 0.000001
        for j=1:sized(1)
            if V(j,i) ~= 0
                indic(j) = i;
                col(j,1:3) = colors(i,1:3);
            end
        end
    end
end
indic;
col;
size(col);
size(x);
scatter(x, y, 36, col, 'filled')
% col, 'filled');