function normal01_multivariate_distance_plot ( m )

%*****************************************************************************80
%
%% normal01_multivariate_distance_plot plots a multivariate normal distance PDF.
%
%  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.
%
  n = 101;
  x = linspace ( 0, 0.5*m^2, 101 );
  y = 0.5 * chi2pdf ( 0.5*x, m );

  plot ( x, y, 'r-' );
  grid ( 'on' );
  xlabel ( '<-- Distance -->' );
  ylabel ( '<-- Frequency -->' );
  label = sprintf ( 'Theoretical PDF for %d-dimensional normal01 samples', m );
  title ( label )
  filename = 'normal01_multivariate_distance_plot.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end
