function dsbmv_test ( )

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

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

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

  a = zeros ( lda, n );

  for i = 1 : m

    jhi = min ( n, i + k );

    for j = i : jhi

      if ( i == j )
        a(k+1+i-j,j) = 2.0;
      elseif ( i == j - 1 )
        a(k+1+i-j,j) = -1.0;
      else
        a(k+1+i-j,j) = 0.0;
      end

    end
  end

  x = zeros ( n, 1 );

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

  y = zeros ( m, 1 );

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

  y = dsbmv ( uplo, n, k, alpha, a, lda, x, incx, beta, y, incy );

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

  return
end