function mm_size_write ( output_unit, rep, nrow, ncol, nnz )

%*****************************************************************************80
%
%% mm_size_write() writes size information to a Matrix Market file.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 April 2004
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer OUTPUT_UNIT, the input file unit.
%
%    character REP, the Matrix Market 'representation'
%    indicator.  Possible values include:
%    'coordinate'   (for sparse data)
%    'array'        (for dense data)
%    'elemental'    (to be added)
%
%    integer NROW, the number of rows in the matrix.
%
%    integer NCOL, the number of columns in the matrix.
%
%    integer NNZ, the number of nonzero entries required to store
%    the matrix.
%
  if ( s_eqi ( rep, 'coordinate' ) )
    fprintf ( output_unit, '%d  %d  %d\n', nrow, ncol, nnz );
  elseif ( s_eqi ( rep, 'array' ) )
    fprintf ( output_unit, '%d  %d\n', nrow, ncol );
  end

  return
end
