function divdif_test ( )

%*****************************************************************************80
%
%% divdif_test tests divdif.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 June 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'divdif_test:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test divdif():\n' );
%
%  cos(x)
%
  x = linspace ( 0.0, 1.2, 7 );
  y = cos ( x );
  d = divdif ( x, y );

  fprintf ( 1, '\n' );
  fprintf ( 1, ' i    x(i)   cos(x(i))       divdif(i)\n' );
  fprintf ( 1, '\n' );
  for i = 1 : 7
    fprintf ( 1, '%2d  %6.2f  %10.6f  %14.6g\n', i, x(i), y(i), d(i) );
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'divdif_test:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

