function showpwl1 ( )
%
% Convergence of the piecewise linear interpolant to
% humps(x) on [0,2*pi].

  fprintf ( 1, '\n' );
  fprintf ( 1, 'showpwl1():\n' );

  z = linspace(0,3,200)';
  fvals = humps(z);
  for n = [5 10 25 50]
    x = linspace(0,3,n)';
    y = humps(x);
    [a,b] = pwL(x,y);
    Lvals = pwLEval(a,b,x,z);
    plot(z,Lvals,z,fvals,x,y,'o');
    title(sprintf('Interpolation of humps(x) with pwL, n = %2.0f',n))
    filename = sprintf ( 'showpwl1_%d.png', n );
    print ( '-dpng', filename );
    fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  end

  return
end


