function ksub_unrank_test ( )

%*****************************************************************************80
%
%% ksub_unrank_test() tests ksub_unrank().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  k = 3;
  n = 5;
  rank = 8;
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ksub_unrank_test():\n' );
  fprintf ( 1, '  ksub_unrank() finds the K-subset of an N set\n' );
  fprintf ( 1, '  of a given rank.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  N is %d\n', n );
  fprintf ( 1, '  K is %d\n', k );
  fprintf ( 1, '  and the desired rank is %d\n', rank );
 
  a = ksub_unrank ( k, rank );
 
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The subset of the given rank is:\n' );
  for i = 1 : k
    fprintf ( 1, '  %2d', a(i) );
  end
  fprintf ( 1, '\n' );

  return
end
