function dspmv_test ( )

%*****************************************************************************80
%
%% DSPMV_TEST tests DSPMV.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    22 March 2017
%
%  Author:
%
%    John Burkardt
%
  n = 5;
  k = 1;
  lda = k + 1;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'DSPMV_TEST\n' );
  fprintf ( 1, '  DSPMV computes y := alpha * A * x + beta * y\n' );
  fprintf ( 1, '  for a symmetric packed band matrix A.\n' );

  uplo = 'U';
  alpha = 2.0;
  incx = 1;
  beta = 3.0;
  incy = 1;

  ap = zeros ( ( n * ( n + 1 ) ) / 2, 1 );

  k = 0;
  for j = 1 : n
    for i = 1 : j
      k = k + 1;
      if ( i == j )
        ap(k) = 2.0;
      elseif ( i == j - 1 )
        ap(k) = -1.0;
      else
        ap(k) = 0.0;
      end

    end
  end

  x = zeros ( n, 1 );

  for i = 1 : n
    x(i) = i;
  end

  y = zeros ( n, 1 );

  for i = 1 : n
    y(i) = 10 * i;
  end

  y = dspmv ( uplo, n, alpha, ap, x, incx, beta, y, incy );

  r8vec_print ( n, y, '  Result Y:' );

  return
end
