function value = r8mat_product_elementwise ( m, n, a, b )

%*****************************************************************************80
%
%% R8MAT_PRODUCT_ELEMENTWISE returns the elementwise produce to two R8MAT's.
%
%  Example:
%
%    A = [ 1, 2, 3;    B = [ 1, 3, 5;    product = 86
%          4, 5, 6 ]         2, 4, 6 ]
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    31 March 2018
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer M, the number of rows.
%
%    Input, integer N, the number of columns.
%
%    Input, real A(M,N), B(M,N), the two matrices.
%
%    Output, real VALUE, the elementwise product of A and B.
%
  value = sum ( sum ( a .* b ) );

  return
end
