function a = r8mat_identity ( m, n )

%*****************************************************************************80
%
%% r8mat_identity() sets the MxN matrix A to the identity.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 February 2016
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of A.
%
%  Output:
%
%    real A(M,N), the M by N identity matrix.
%
  a(1:m,1:n) = 0.0;

  for i = 1 : min ( m, n )
    a(i,i) = 1.0;
  end

  return
end
