function nakagami_sample_test ( )

%*****************************************************************************80
%
%% nakagami_sample_test() tests nakagami_sample().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 April 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'NAKAGAMI_SAMPLE_TEST():\n' );
  fprintf ( 1, '  NAKAGAMI_MEAN() computes the Nakagami mean;\n' );
  fprintf ( 1, '  NAKAGAMI_VARIANCE() computes the Nakagami variance.\n' );

  a = 1.0;
  b = 2.0;
  c = 3.0;

  check = nakagami_check ( a, b, c );

  if ( ~ check );
    fprintf ( 1, '\n' );
    fprintf ( 1, 'NAKAGAMI_SAMPLE_TEST(): Fatal error!\n' );
    fprintf ( 1, '  The parameters are not legal.\n' );
    return
  end

  mean = nakagami_mean ( a, b, c );
  variance = nakagami_variance ( a, b, c );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  PDF parameter A =             %14g\n', a );
  fprintf ( 1, '  PDF parameter B =             %14g\n', b );
  fprintf ( 1, '  PDF parameter C =             %14g\n', c );
  fprintf ( 1, '  PDF mean =                    %14g\n', mean );
  fprintf ( 1, '  PDF variance =                %14g\n', variance );

  return
end
