function pgm_project_test ( )

%*****************************************************************************80
%
%% pgm_project_test() demonstrates projection using principal component vectors.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    06 December 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'pgm_project_test():\n' );
  fprintf ( 1, '  Pack multiple PGM files into a single array.\n' );
  fprintf ( 1, '  Generate a set of principal component vectors.\n' );
  fprintf ( 1, '  Given one of those PGM files, reconstruct the image\n' );
  fprintf ( 1, '  as a sum of the average plus projections onto vectors.\n' );
  fprintf ( 1, '  Repeat for a PGM file that is NOT in the database.' );

  filelist = 's01_list.txt';
  n = 9;
  pgm_filename = 's0103.pgm';
  pgm_project ( filelist, n, pgm_filename );
  pause ( 5 );

  filelist = 's01_list.txt';
  n = 9;
  pgm_filename = 's0203.pgm';
  pgm_project ( filelist, n, pgm_filename );
  pause ( 5 );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'pgm_project_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
