n_arr = [9 19 39 79 159];

for k=1:length(n_arr)
  h = 1 / (n_arr(k) + 1);
  x = h:h:(1-h);
  f = 100 * exp(-10 * x);
  ts = 1 - (1 - exp(-10)) * x - exp(-10 * x);
  ns1 = fdif(f, n_arr(k));
  e1 = max(abs(ts - ns1'));
  ehat = 10000 * h*h / 96;
  [h e1 ehat]
end
