function mexican_hat_surface ( )

%*****************************************************************************80
%
%% mexican_hat_surface makes a 3D surface plot of "Mexican hat" data.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 September 2018
%
%  Author:
%
%    John Burkardt
%
  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'mexican_hat_surface\n' );
  fprintf ( 1, '  MATLAB/Octave version %s:\n', version ( ) );
  fprintf ( 1, '  Make a 3D surface plot of Mexican hat data.\n' );

  x = linspace ( - 8.0, 8.0, 33 );
  y = linspace ( - 8.0, 8.0, 33 );
  [ X, Y ] = meshgrid ( x, y );
  R = sqrt ( X.^2 + Y.^2 + eps );
  Z = sin ( R ) ./ R;
  surf ( X, Y, Z );
  xlabel ( '<--- X --->', 'Fontsize', 16 );
  ylabel ( '<--- Y --->', 'Fontsize', 16 );
  title ( 'Mexican Hat function', 'Fontsize', 16 );

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

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

  return
end
