function data = powers_data ( xmin, xmax, m, n )

%*****************************************************************************80
%
%% POWERS_DATA generates DATA(I,J) = X(I)^(J-1).
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    06 December 2018
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, real XMIN, XMAX, the range of the X data.
%
%    Input, integer M, the number of X values to generate.
%
%    Input, integer N, the number of powers I to consider, between 0 and N-1.
%
%    Output, real DATA(M,N).  DATA(I,J) = X(I)^(J-1).
%
  data = zeros ( m, n );

  x = linspace ( xmin, xmax, m );
  x = x';

  for j = 1 : n
    data(:,j) = x .^ ( j - 1 );
  end

  return
end
