function [ a, u, v ] = r8sm_indicator ( m, n )

%*****************************************************************************80
%
%% R8SM_INDICATOR returns the indicator matrix as an R8SM matrix.
%
%  Discussion:
%
%    The R8SM storage format is used for an M by N Sherman Morrison matrix B,
%    which is defined by an M by N matrix A, an M vector U, and
%    an N vector V, by B = A - U * V'
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    30 May 2016
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer M, N, the number of rows and columns 
%    of the matrix.
%
%    Output, real A(M,N), the R8SM matrix.
%
%    Output, real U(M), V(N), the R8SM vectors.
%
  fac = 10 ^ ( i4_log_10 ( n ) + 1 );

  u = - ones ( m, 1 );

  v = linspace ( 1, n, n );
  v = v';

  a = zeros ( m, n );
  for i = 1 : m
    a(i,1:n) = fac * i;
  end
 
  return
end
