function r8st_read_test ( )

%*****************************************************************************80
%
%% r8st_read_test() tests r8st_read().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 September 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8st_read_test():\n' );
  fprintf ( 1, '  r8st_read_size() reads the size of an r8st matrix.\n' );
  fprintf ( 1, '  r8st_read() reads the r8st matrix from a file.\n' );

  input_file = 'r8st_matrix.txt';

  [ m, n, nz_num ] = r8st_read_size ( input_file );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix order M         = %d\n', m );
  fprintf ( 1, '  Matrix order N         = %d\n', n );
  fprintf ( 1, '  Matrix nonzeros NZ_NUM = %d\n', nz_num );

  [ row, col, a ] = r8st_read ( input_file, m, n, nz_num );

  r8st_print_some ( m, n, nz_num, row, col, a, 1, 1, ...
    10, 10, '  Initial 10x10 block of recovered r8st matrix:' );

  return
end
