function colored_noise_test01 ( n, q_d, alpha )

%*****************************************************************************80
%
%% colored_noise_test01() calls f_alpha() with particular parameters.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    10 June 2010
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of elements of the sequence 
%    to generate.
%
%    real Q_D, the variance of the sequence.
%
%    real ALPHA, the exponent of the power law.
%
  output_filename = sprintf ( 'alpha_%4.2f.txt', alpha );
%
%  Report parameters.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'colored_noise_test01():\n' );
  fprintf ( 1, '  Generating %d sample points.\n', n );
  fprintf ( 1, '  1/F^ALPHA noise has ALPHA = %f\n', alpha );
  fprintf ( 1, '  Variance is %f\n', q_d );

  x = f_alpha ( n, q_d, alpha );
%
%  Print no more than 10 entries of the data.
%
  r8vec_print_part ( n, x, 1, 10, '  Noise sample:' );
%
%  Write the data to a file.
%
  output_unit = fopen ( output_filename, 'wt' );

  for i = 1 : n
    fprintf ( output_unit, '%f\n', x(i) );
  end

  fclose ( output_unit );

  fprintf ( 1, '  Data written to file "%s".\n', output_filename );

  return
end
 
