function normal01_multivariate_distance_histogram ( m, n )

%*****************************************************************************80
%
%% normal01_multivariate_distance_histogram() histograms normal distances.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 May 2019
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the spatial dimension.
%
%    integer N, the number of samples to use.
%
  clf ( );

  t = zeros ( n, 1 );
  for i = 1 : n
    p = randn ( m, 1 );
    q = randn ( m, 1 );
    t(i) = norm ( p - q );
  end

  bins = 20;
  hist ( t.^2, bins );
  grid ( 'on' );
  xlabel ( '<-- Distance -->' );
  ylabel ( '<-- Frequency -->' );
  label = sprintf ( 'Distance between random %d-dimensional normal01 samples', m );
  title ( label );
  filename = 'normal01_multivariate_distance_histogram.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end
