function usa_matrix_test ( )

%*****************************************************************************80
%
%% usa_matrix_test() tests usa_matrix().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    05 November 2022
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../usa_matrix' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'usa_matrix_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test usa_matrix()\n' );
%
%  Evaluate the GE matrix, and use spy() to draw an image of it.
%
  A = usa_ge ( );
  spy ( A );
  grid ( 'on' );
  axis ( 'square' );
  axis ( 'equal' );
  axis ( 'tight' );
  title ( 'spy(): usa\_ge() matrix' )
  filename = 'usa_ge.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved in "%s"\n', filename );
%
%  Evaluate the MSM matrix, and use spy() to draw an image of it.
%
  A = usa_msm ( );
  spy ( A );
  grid ( 'on' );
  axis ( 'square' );
  axis ( 'equal' );
  axis ( 'tight' );
  title ( 'spy(): usa\_msm() matrix' )
  filename = 'usa_msm.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved in "%s"\n', filename );
%
%  Evaluate the ST matrix, and use spy() to draw an image of it.
%
  [ i, j, v ] = usa_st ( );
  k = i + ( j - 1 ) * 50;
  A = zeros ( 50, 50 );
  A(k) = v;
  spy ( A );
  grid ( 'on' );
  axis ( 'square' );
  axis ( 'equal' );
  axis ( 'tight' );
  title ( 'spy(): usa\_st() matrix' )
  filename = 'usa_st.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved in "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'usa_matrix_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  rmpath ( '../usa_matrix' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

