function a = kms_eigen_right ( alpha, n )

%*****************************************************************************80
%
%% KMS_EIGEN_RIGHT returns the right eigenvectors of the KMS matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 June 2011
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    William Trench,
%    Spectral decomposition of Kac-Murdock-Szego matrices,
%    Unpublished technical report.
%
%  Input:
%
%    real ALPHA, the parameter.
%    Eigenvalue computations require 0 <= ALPHA <= 1.
%
%    integer N, the order of A.
%
%  Output:
%
%    Output, real A(N,N), the right eigenvector matrix.
%
  t = kms_eigenvalues_theta ( alpha, n );

  a = zeros ( n, n );

  for i = 1 : n
    a(i,1:n) = sin ( i * t(1:n) ) - alpha * sin ( ( i - 1 ) * t(1:n) );
  end

  return
end
