function truncated_normal_b_sample_test ( )

%*****************************************************************************80
%
%% truncated_normal_b_sample_test() tests truncated_normal_b_sample().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 March 2015
%
%  Author:
%
%    John Burkardt
%
  sample_num = 10;
  b = 150.0;
  mu = 100.0;
  sigma = 25.0;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'truncated_normal_b_sample_test():\n' );
  fprintf ( 1, '  truncated_normal_b_sample() samples\n' );
  fprintf ( 1, '  the upper Truncated Normal Distribution.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The "parent" normal distribution has\n' );
  fprintf ( 1, '    mean =               %g\n', mu );
  fprintf ( 1, '    standard deviation = %g\n', sigma );
  fprintf ( 1, '  The parent distribution is truncated to\n' );
  fprintf ( 1, '  the interval (-oo,%g]\n', b );
  fprintf ( 1, '\n' );

  for i = 1 : sample_num
    x = truncated_normal_b_sample ( mu, sigma, b );
    fprintf ( 1, '  %2d  %14.6g\n', i, x );
  end

  return
end
