clear all
close all

% s=input('dimension = ');
s=3;

n=input('numero pti halton = ');

h=haltonseq(n,s);
hh=linspace(0,1,3*n);

switch s
    case 1
         epts=hh';
    case 2
        [ex,ey]=ndgrid(hh');
        epts=[ex(:) ey(:)];
    case 3
        [ex,ey,ez]=ndgrid(hh');
        epts=[ex(:),ey(:),ez(:)];
end

DM=DistanceMatrix(epts,h);
cond(DM)


ms=max(min(DM'))