function pgm_project_test ( )

%*****************************************************************************80
%
%% PGM_PROJECT_TEST demonstrates projection using principal component vectors.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL 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 ( 10 );

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

  return
end
