function dream_test ( )

%*****************************************************************************80
%
%% dream_test() tests dream().
%
%  Discussion:
%
%    The DREAM program was originally developed by Guannan Zhang, of
%    Oak Ridge National Laboratory (ORNL); it has been incorporated into 
%    the DAKOTA package of Sandia National Laboratory, and is
%    intended to form part of the ORNL package known as TASMANIA.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 January 2019
%
%  Author:
%
%    Original FORTRAN90 version by Guannan Zhang.
%    MATLAB version by John Burkardt.
%
  addpath ( '../dream' );
  addpath ( '../pdflib' );
  addpath ( '../rnglib' );

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

  dream ( @p0_size, @p0_value, @p0_prior_density, @p0_prior_sample, ...
    @p0_sample_likelihood );

  dream ( @p2_size, @p2_value, @p2_prior_density, @p2_prior_sample, ...
    @p2_sample_likelihood );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'dream_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../dream' );
  rmpath ( '../pdflib' );
  rmpath ( '../rnglib' );

  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

