function r8sd_mv_test ( )

%*****************************************************************************80
%
%% R8SD_MV_TEST tests R8SD_MV.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 March 2009
%
%  Author:
%
%    John Burkardt
%
  n = 10;
  ndiag = 3;
  offset = [ 0, 1, 3 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8SD_MV_TEST\n' );
  fprintf ( 1, '  R8SD_MV computes b=A*x, where A is an R8SD matrix.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix order N =         %d\n', n );
  fprintf ( 1, '  Matrix diagonals NDIAG = %d\n', ndiag );

  a = r8sd_indicator ( n, ndiag, offset );

  r8sd_print ( n, ndiag, offset, a, '  The R8SD matrix:' );

  x = r8vec_indicator1 ( n );

  r8vec_print ( n, x, '  The vector x:' );

  b = r8sd_mv ( n, ndiag, offset, a, x );

  r8vec_print ( n, b, '  The product b=A*x' );

  return
end
