function matrix_print ( m, n, a, label )

%*****************************************************************************80
%
%% matrix_print() prints a matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 November 2005
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, N: the dimensions of the matrix.
%
%    real A(M,N), the matrix values.
%
%    character LABEL, a label for the data.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '%s\n', label );
  fprintf ( 1, '\n' );
  for i = 1 : m
    for j = 1 : n
      fprintf ( 1, '%8.4f', a(i,j) );
    end
    fprintf ( 1, '\n' );
  end

  return
end
