function a = r8utp_indicator ( m, n )

%*****************************************************************************80
%
%% r8utp_indicator() sets up a R8UTP indicator matrix.
%
%  Discussion:
%
%    The R8UTP storage format is appropriate for an upper triangular
%    matrix.  Only the upper triangle of the matrix is stored,
%    by successive partial columns, in an array which contains
%    (A11,A12,A22,A13,A23,A33,A14,...,AMN).
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 August 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, N, the number of rows and columns of the matrix.
%    M and N must be positive.
%
%  Output:
%
%    real A(*), the R8UTP matrix.
%
  fac = 10^( i4_log_10 ( n ) + 1 );

  mn = r8utp_size ( m, n );

  a = zeros ( mn, 1 );

  k = 0;
  for j = 1 : n
    for i = 1 : min ( j, m )
      k = k + 1;
      a(k) = fac * i + j;
    end
  end

  return
end
