function W= ndimweightmatrix(X,eps);
%X is a matrix where each column represents a point in R^n and each row
%represents the ith term in said point. So the point in R^3, (2,3,4) wo0uld
%be found as a column vector in X. The number of points is equal to the
%number of columns.
%A point i is therefore the ith column in X$.

numPoints = size(X,2);
W = [];
for i = 1:numPoints
    for j =1:numPoints
        W(i,j) = sum((X(:,i)-X(:,j)).^2)^0.5 < eps;
    end
end
    