function [ n_data, alpha, beta, x, fx ] = beta_pdf_values ( n_data )

%*****************************************************************************80
%
%% BETA_PDF_VALUES returns some values of the Beta PDF.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    30 July 2015
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input/output, integer N_DATA.  The user sets N_DATA to 0 before the
%    first call.  On each call, the routine increments N_DATA by 1, and
%    returns the corresponding data; when there is no more data, the
%    output value of N_DATA will be 0 again.
%
%    Output, real ALPHA, BETA, the parameters of the function.
%
%    Output, real X, the argument of the function.
%
%    Output, real FX, the value of the function.
%
  n_max = 10;

  alpha_vec = [ ...
       1.092091484911879, ...
       2.808477213834471, ...
       1.287888961910225, ...
       3.169828561512062, ...
       2.006531407488083, ...
    0.009191855792026001, ...
       0.472723751058401, ...
       4.204237253278341, ...
       1.301514988836825, ...
       1.758143299519481 ];

  beta_vec = [ ...
       4.781587882544648, ...
       2.076535407379806, ...
       0.549783967662353, ...
      0.3086361453280091, ...
       3.773367432107051, ...
       4.487520304498656, ...
     0.06808445791730976, ...
      0.6155195788227712, ...
       4.562418534907164, ...
       4.114436583429598 ];

  fx_vec = [ ...
    0.002826137156803199, ...
     0.04208950342768649, ...
      0.2184064957817208, ...
      0.1335142301445414, ...
      0.1070571849830009, ...
    0.005796394377470491, ...
      0.5518796772414584, ...
                     0.0, ...
        2.87907465409348, ...
       2.126992854611924 ];

  x_vec = [ ...
      0.8667224264776531, ...
     0.04607764003473368, ...
     0.02211617261254013, ...
      0.4582543823302144, ...
      0.8320834756642252, ...
      0.3520587633290876, ...
       0.898529119425846, ...
    -0.01692420862048847, ...
     0.09718884992568674, ...
      0.2621671905296927 ];

  if ( n_data < 0 )
    n_data = 0;
  end

  n_data = n_data + 1;

  if ( n_max < n_data )
    n_data = 0;
    alpha = 0.0;
    beta = 0.0;
    x = 0.0;
    fx = 0.0;
  else
    alpha = alpha_vec(n_data);
    beta = beta_vec(n_data);
    x = x_vec(n_data);
    fx = fx_vec(n_data);
  end

  return
end
