function r8bb_set_test ( )

%*****************************************************************************80
%
%% R8BB_SET_TEST tests R8BB_SET.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    10 July 2016
%
%  Author:
%
%    John Burkardt
%
  n1 = 4;
  n2 = 1;
  n = n1 + n2;
  ml = 2;
  mu = 1;
  na = ( 2 * ml + mu + 1 ) * n1 + 2 * n1 * n2 + n2 * n2;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8BB_SET_TEST\n' );
  fprintf ( 1, '  R8BB_SET sets elements of an R8BB matrix.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix order N =     %d\n', n );
  fprintf ( 1, '  Matrix suborder N1 = %d\n', n1 );
  fprintf ( 1, '  Matrix suborder N2 = %d\n', n2 );
  fprintf ( 1, '  Lower bandwidth ML = %d\n', ml );
  fprintf ( 1, '  Upper bandwidth MU = %d\n', mu );
%
%  Initialize matrix to zero.
%
  a = r8bb_zeros ( n1, n2, ml, mu );
%
%  Fill in band matrix.
%
  for i = 1 : n1
    for j = 1 : n1
      if ( i - ml <= j && j <= i + mu )
        value = 10 * i + j;
        a = r8bb_set ( n1, n2, ml, mu, a, i, j, value );
      end
    end
  end
%
%  Fill in right border vector.
%
  for i = 1 : n1
    for j = n1 + 1 : n1 + n2
      value = 10 * i + j;
      a = r8bb_set ( n1, n2, ml, mu, a, i, j, value );
    end
  end
%
%  Fill in lower border vector.
%
  for i = n1 + 1 : n1 + n2
    for j = 1 : n1
      value = 10 * i + j;
      a = r8bb_set ( n1, n2, ml, mu, a, i, j, value );
    end
  end
%
%  Fill in lower right dense matrix.
%
  for i = n1 + 1 : n1 + n2
    for j = n1 + 1 : n1 + n2
      value = 10 * i + j;
      a = r8bb_set ( n1, n2, ml, mu, a, i, j, value );
    end
  end

  r8bb_print ( n1, n2, ml, mu, a, '  The R8BB matrix:' );

  return
end