function r8mat_diag_get_vector_test ( )

%*****************************************************************************80
%
%% r8mat_diag_get_vector_test() tests r8mat_diag_get_vector().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 August 2018
%
%  Author:
%
%    John Burkardt
%
  n = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8MAT_DIAG_GET_VECTOR_TEST\n' );
  fprintf ( 1, '  R8MAT_DIAG_GET_VECTOR gets a vector of the diagonal\n' );
  fprintf ( 1, '  entries of an R8MAT.\n' );

  a = r8mat_indicator ( n, n );
  r8mat_print ( n, n, a, '  Initial matrix A:' );

  v = r8mat_diag_get_vector ( n, a );
  r8vec_print ( n, v, '  Diagonal vector:' );

  return
end
