function mexican_hat_surface ( )

%*****************************************************************************80
%
%% mexican_hat_surface makes a surface plot of "Mexican hat" data.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    08 October 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'mexican_hat_surface\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Make a 3D surface plot of Mexican hat data.\n' );
%
%  Define the grid.
%
  x = linspace ( -8.0, 8.0, 33 );
  y = linspace ( -8.0, 8.0, 33 );
  [ X, Y ] = meshgrid ( x, y );
%
%  Evaluate functions R(X,Y)  and Z(X,Y) on the grid.
%
  R = sqrt ( X.^2 + Y.^2 + eps );
  Z = sin ( R ) ./ R;
%
%  Display the surface Z(X,Y).
%
  surf ( X, Y, Z );
  xlabel ( '<-- X -->' );
  ylabel ( '<-- Y -->' );
  zlabel ( '<-- Z(X,Y) -->' );
  title ( 'Mexican hat surface' );

  filename = 'mexican_hat_surface.png';
  print ( '-dpng', filename );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics saved in "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'mexican_hat_surface\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
