function [ x, y ] = p06_dat ( data_num )

%*****************************************************************************80
%
%% p06_dat() returns the data vector for problem 6.
%
%  Discussion:
%
%    The X data is equally spaced.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 August 2011
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer DATA_NUM, the number of data points.
%
%  Output:
%
%    real X(DATA_NUM,1), the abscissa data.
%
%    real Y(DATA_NUM,1), the ordinate data.
%
  x = zeros ( data_num, 1 );
  y = zeros ( data_num, 1 );

  num_int = 5;

  n = 1;
  x(n,1) = 0.0;
  y(n,1) = 0.0;

  for i = 1 : num_int

    for j = 1 : i
      n = n + 1;
      x(n,1) = ( i - 1 ) + 0.5 * j /i;
      y(n,1) = j / i;
    end

    for j = 1 : i
      n = n + 1;
      x(n,1) = i - 1 + 0.5 + 0.5 * j / i;
      y(n,1) = 1.0 - j / i;
    end

  end

  return
end
