function i4vec_sorted_unique_hist_test ( )

%*****************************************************************************80
%
%% I4VEC_SORTED_UNIQUE_HIST_TEST tests I4VEC_SORTED_UNIQUE_HIST_TEST.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    29 February 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'I4VEC_SORTED_UNIQUE_HIST_TEST\n' );
  fprintf ( 1, '  I4VEC_SORTED_UNIQUE_HIST_TEST is given a sorted array\n' );
  fprintf ( 1, '  of integers, and returns the number of unique values,\n' );
  fprintf ( 1, '  the unique values, and their frequency.\n' );

  n = 50;
  a = 0;
  b = 10;
  seed = 123456789;

  [ v1, seed ] = i4vec_uniform_ab ( n, a, b, seed );

  [ v2, seed ] = i4vec_uniform_ab ( n, a, b, seed );

  v3(1:n) = v1(1:n) .* v2(1:n);

  v3 = sort ( v3 );

  i4vec_print ( n, v3, '  The sorted vector:' );

  [ unique_num, unique_value,  unique_freq ] = i4vec_sorted_unique_hist ( n, v3 );

  i4vec2_print ( unique_num, unique_value, unique_freq, ...
    '  Unique values and frequencies:' );

  return
end
