function hyperball_positive_distance_histogram ( m, n )

%*****************************************************************************80
%
%% hyperball_positive_distance_histogram() histograms unit positive hyperball distance statistics.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 August 2023
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the spatial dimension.
%
%    integer N, the number of samples to use.
%
  t = zeros ( n, 1 );
  for i = 1 : n
    p = hyperball_positive_sample ( m );
    q = hyperball_positive_sample ( m );
    t(i) = norm ( p - q );
  end

  bins = 40;
  histogram_pdf ( t, bins );
  grid ( 'on' );
  xlabel ( '<-- Distance -->' );
  ylabel ( '<-- Frequency -->' );
  title ( 'Distance between a pair of random points in a unit positive hyperball' );

  return
end
