function r8mat_write_bin ( output_filename, m, n, x )

%*****************************************************************************80
%
%% r8mat_write_bin() writes an array of real data to a binary file.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 August 2013
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    string OUTPUT_FILENAME, the output filename.
%
%    integer M, the spatial dimension.
%
%    integer N, the number of data items.
%
%    real X(M,N), the data.
%
  output_unit = fopen ( output_filename, 'wb' );

  count = fwrite ( output_unit, x, 'double' );

  fclose ( output_unit );

  return
end
