function pdf = get_discrete_pdf_data2 ( n1, n2 )

%*****************************************************************************80
%
%% get_discrete_pdf_data2() returns the discrete PDF data array.
%
%  Discussion:
%
%    Cell (I,J) extends from 
%
%      (I-1) * H < Y < I * H
%      (J-1) * H < X < J * H
%
%    We have data for each cell, representing the integral of some PDF
%    over that cell.  The function pdf(x,y) must be nonnegative.  However,
%    we don't impose any other conditions on it.
%
%    The array PDF(:,:) contains the integral of pdf(x,y) over each cell,
%    or, almost as good, simply a sample or average value.
%
%    We load the array PDF, and then we normalize it so that the sum of
%    all the entries is 1.  
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 Decdember 2012
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N1, N2, the number of rows and columns
%    of PDF data.
%
%  Output:
%
%    real PDF(N1,N2).  PDF(I,J) is the discrete PDF 
%    for the cell (I,J), normalized so that the sum over all cells is 1.
%
  pdf = [ ...
     10.0,  20.0,  10.0,  10.0,  20.0,  10.0, ...
     30.0,  10.0,  10.0,  10.0,  10.0,  50.0; ...
     25.0,  30.0,  10.0,  25.0,  30.0,  40.0, ...
     30.0,  20.0,  10.0,  20.0,  30.0,  40.0; ...
     25.0,  30.0,  20.0,  10.0,  40.0, 200.0, ...
     50.0,  40.0,  10.0,  30.0,  60.0,  40.0; ...
     20.0,  30.0,  40.0,  10.0,  75.0, 100.0, ...
    100.0,  30.0,  25.0,  25.0,  90.0,  30.0; ...
     75.0,  15.0,  20.0,  10.0,  75.0,  50.0, ...
     40.0,  10.0, 100.0,  25.0,  25.0,  80.0; ...
     25.0,  50.0,  50.0,  10.0,  25.0,  25.0, ...
     15.0,  10.0,  25.0,  25.0,  10.0,  10.0; ...
    100.0,  50.0,  50.0,  10.0,  10.0,  10.0, ...
      5.0, 100.0,  50.0,  50.0,  10.0,  10.0; ...
     10.0,  10.0,  25.0,  50.0,  10.0,  50.0, ...
     10.0,  50.0,  25.0,  25.0,  25.0,  10.0 ]';
%
%  Normalize to get an integral of 1.
%
  total = sum ( sum ( pdf(1:n1,1:n2) ) );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  PDF data sums to %g\n', total );

  pdf(1:n1,1:n2) = pdf(1:n1,1:n2) / total;

  return
end
