function r8ccs_write_test ( )

%*****************************************************************************80
%
%% r8ccs_write_test() tests r8ccs_write().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 October 2015
%
%  Author:
%
%    John Burkardt
%
  m = 5;
  n = 5;
  nz_num = 12;

  a_file = 'r8ccs_a.txt';
  col = [ 1, 4, 6, 8, 10, 13 ];
  col_file = 'r8ccs_col.txt';
  row = [ 1, 2, 4, 1, 2, 3, 5, 4, 5, 1, 2, 5 ];
  row_file = 'r8ccs_row.txt';

  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8ccs_write_test():\n' );
  fprintf ( 1, '  r8ccs_write() writes an r8ccs matrix to 3 files\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix rows M     = %d\n', m );
  fprintf ( 1, '  Matrix columns N  = %d\n', n );
  fprintf ( 1, '  Nonzeros NZ_NUM   = %d\n', nz_num );

  i4vec_print ( n + 1, col, '  The COL vector:' );

  i4vec_print ( nz_num, row, '  The ROW vector:' );

  a = r8ccs_indicator ( m, n, nz_num, col, row );

  r8ccs_print ( m, n, nz_num, col, row, a, '  The r8ccs matrix:' );

  r8ccs_write ( col_file, row_file, a_file, m, n, nz_num, col, row, a );

  return
end
