function chebyzero_test ( )

%*****************************************************************************80
%
%% chebyzero_test() does the Lebesgue analysis for the Chebyshev Zero nodes.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 August 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'chebyzero_test():\n' );
  fprintf ( 1, '  Read sets of Chebyshev Zero nodes in [-1,+1],\n' );
  fprintf ( 1, '  computed by CHEBYSHEV_1D_LUMPING.\n' );
  fprintf ( 1, '  For a set of dimension N, estimate the Lebesgue constant L,\n' );
  fprintf ( 1, '  and the ratio of L to log(N+1).\n' );

  nfun = 10001;

  k = 0;

  filename = 'chebyzero_005.txt';
  x = load ( filename );
  n = length ( x );
  xfun = linspace ( -1.0, +1.0, nfun );
  l = lebesgue_constant ( n, x, nfun, xfun );
  k = k + 1;
  n_plot(k) = n;
  l_plot(k) = l;
  l2_plot(k) = l / log ( n + 1 );

  filename = 'chebyzero_009.txt';
  x = load ( filename );
  n = length ( x );
  xfun = linspace ( -1.0, +1.0, nfun );
  l = lebesgue_constant ( n, x, nfun, xfun );
  k = k + 1;
  n_plot(k) = n;
  l_plot(k) = l;
  l2_plot(k) = l / log ( n + 1 );

  filename = 'chebyzero_017.txt';
  x = load ( filename );
  n = length ( x );
  xfun = linspace ( -1.0, +1.0, nfun );
  l = lebesgue_constant ( n, x, nfun, xfun );
  k = k + 1;
  n_plot(k) = n;
  l_plot(k) = l;
  l2_plot(k) = l / log ( n + 1 );

  filename = 'chebyzero_033.txt';
  x = load ( filename );
  n = length ( x );
  xfun = linspace ( -1.0, +1.0, nfun );
  l = lebesgue_constant ( n, x, nfun, xfun );
  k = k + 1;
  n_plot(k) = n;
  l_plot(k) = l;
  l2_plot(k) = l / log ( n + 1 );

  filename = 'chebyzero_065.txt';
  x = load ( filename );
  n = length ( x );
  xfun = linspace ( -1.0, +1.0, nfun );
  l = lebesgue_constant ( n, x, nfun, xfun );
  k = k + 1;
  n_plot(k) = n;
  l_plot(k) = l;
  l2_plot(k) = l / log ( n + 1 );

  filename = 'chebyzero_129.txt';
  x = load ( filename );
  n = length ( x );
  xfun = linspace ( -1.0, +1.0, nfun );
  l = lebesgue_constant ( n, x, nfun, xfun );
  k = k + 1;
  n_plot(k) = n;
  l_plot(k) = l;
  l2_plot(k) = l / log ( n + 1 );

  filename = 'chebyzero_257.txt';
  x = load ( filename );
  n = length ( x );
  xfun = linspace ( -1.0, +1.0, nfun );
  l = lebesgue_constant ( n, x, nfun, xfun );
  k = k + 1;
  n_plot(k) = n;
  l_plot(k) = l;
  l2_plot(k) = l / log ( n + 1 );

  r8vec2_print ( n_plot, l_plot, '  L(N) = Lebesgue constants' )
  r8vec2_print ( n_plot, l2_plot, '  L2 = L(N)/log(N+1):' )

  return
end

