function double_c_data_test ( )

%*****************************************************************************80
%
%% double_c_data_test() tests double_c_data().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 January 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../double_c_data' )

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'double_c_data_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test double_c_data().\n' );

  n1 = 25;
  n2 = 25;
  [ x, y, c ] = double_c_data ( n1, n2 );
  filename = sprintf ( 'double_c_data_test_%d_%d.txt', n1, n2 );
  double_c_write ( filename, x, y, c );

  n1 = 100;
  n2 = 100;
  [ x, y, c ] = double_c_data ( n1, n2 );
  filename = sprintf ( 'double_c_data_test_%d_%d.txt', n1, n2 );
  double_c_write ( filename, x, y, c );

  n1 = 100;
  n2 = 400;
  [ x, y, c ] = double_c_data ( n1, n2 );
  filename = sprintf ( 'double_c_data_test_%d_%d.txt', n1, n2 );
  double_c_write ( filename, x, y, c );

  n1 = 500;
  n2 = 500;
  [ x, y, c ] = double_c_data ( n1, n2 );
  filename = sprintf ( 'double_c_data_test_%d_%d.txt', n1, n2 );
  double_c_write ( filename, x, y, c );

  n1 = 800;
  n2 = 600;
  [ x, y, c ] = double_c_data ( n1, n2 );
  filename = sprintf ( 'double_c_data_test_%d_%d.png', n1, n2 );
  double_c_plot ( x, y, c );
  print ( '-dpng', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'double_c_data_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../double_c_data' )

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

