function r8vec_swt_test ( )

%*****************************************************************************80
%
%% R8VEC_SWT_TEST tests R8VEC_SWTB and R8VEC_SWTF.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    22 August 2010
%
%  Author:
%
%    John Burkardt
%
  n = 36;
  alo = 0.0;
  ahi = 5.0;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8VEC_SWT_TEST\n' );
  fprintf ( 1, '  R8VEC_SWTF computes the forward slow wavelet transform.\n' );
  fprintf ( 1, '  R8VEC_SWTB computes the backward slow wavelet transform.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The number of data values, N = %d\n', n );

  seed = 123456789;

  [ x, seed ] = r8vec_uniform_ab ( n, alo, ahi, seed );

  r8vec_print_part ( n, x, 10, '  The original data:' );
%
%  Compute the slow wavelet transform of the data.
%
  [ s, d ] = r8vec_swtf ( n, x );

  fprintf ( 1, '\n' );
  fprintf ( 1, '     I          S(I)            D(I)\n' );
  fprintf ( 1, '\n' );
  for i = 1 : floor ( n + 1 ) / 2
   fprintf ( 1, '  %4d  %14f  %14f\n', i, s(i), d(i) );
  end 
%
%  Now try to retrieve the data from the coefficients.
%
  x = r8vec_swtb ( n, s, d );

  r8vec_print_part ( n, x, 10, '  The retrieved data:' );

  return
end
