function latinize_test01 ( input_filename )

%*****************************************************************************80
%
%% latinize_test01() tests latinize().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 October 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'latinize_test01():\n' );
  fprintf ( 1, '  Input file is "%s".\n', input_filename );

  table = load ( input_filename );
  [ m, n ] = size ( table );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of points M  = %d\n', m );
  fprintf ( 1, '  Spatial dimension N = %d\n', n );
  fprintf ( 1, '  Input data:\n' );
  disp ( table );
%
%  Latinize the array.
%
  table_latin = latinize ( m, n, table );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Latinized data.\n' );
%
%  Print out a small sample of the array.
%
  disp ( table_latin );
%
%  Make up a name for the output file that is likely to be related
%  to the input file name, and unique.
%
  output_filename = file_name_ext_swap ( input_filename, 'latin.txt' );
%
%  Write the latinized array to a file.
%
  save ( output_filename, 'table_latin', '-ascii' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Wrote the latinized data to "%s".\n', output_filename );

  return
end
