function subset_distance_histogram ( m, n )

%*****************************************************************************80
%
%% subset_distance_histogram() histograms line distance statistics.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 January 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the size of the master set.
%
%    integer N, the number of samples to use.
%
  t = zeros ( n, 1 );
  for i = 1 : n
    s1 = subset_sample ( m );
    s2 = subset_sample ( m );
    t(i) = subset_distance_hamming ( s1, s2 );
  end

  bins = m + 1;
  histogram ( t, bins, 'Binlimits', [0,m], 'Normalization', 'pdf' );
  grid ( 'on' );
  xlabel ( '<-- Distance -->' );
  ylabel ( '<-- Frequency -->' );
  title_string = sprintf ( ...
    'Hamming distance between random subsets of a %d-set', m );
  title ( title_string );

  return
end
 
