%learneval

nn = [100 1000 2000 3000 10000]; 
for j=1:length(nn)
   n = nn(j);
   disp(['doing ' num2str(n) ' data points']);
   e = 0;
   for i=1:5
      i
      dst = sampleNet(p,cpts,ones(1,length(p)),n);
      cptst = learnNet(dst,p);
      e = e + sum(sum((cpts-cptst).^2));
   end
   err(j) = e/5;
end
     