function r8st_mv_test ( )

%*****************************************************************************80
%
%% r8st_mv_test() tests r8st_mv().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    22 September 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8st_mv_test():\n' );
  fprintf ( 1, '  r8st_mv() computes b=A*x, where A is an r8st matrix.\n' );

  m = 5;
  n = 4;
  if ( m == n )
    nz_num = 3 * n - 2;
  else
    nz_num = 3 * n - 1;
  end

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

  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 );

  x = r8vec_indicator1 ( n );
  r8vec_print ( n, x, '  x:' );

  b = r8st_mv ( m, n, nz_num, row, col, a, x );

  r8vec_print ( m, b, '  b=A*x:' );

  return
end
