function b = r8utt_mtv ( n, a, x )

%*****************************************************************************80
%
%% R8UTT_MTV computes b = A'*x, where A is an R8UTT matrix.
%
%  Discussion:
%
%    The R8UTT storage format is used for an N by N upper triangular Toeplitz
%    matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 October 2015
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer N, the order of the matrix.
%
%    Input, real A(N), the matrix.
%
%    Input, real X(N), the vector to be multiplied by A.
%
%    Output, real B(N), the product A' * x.
%
  b = zeros ( n, 1 );

  for d = 1 : n
    for j = d : n
      i = j + 1 - d;
      b(j) = b(j) + a(j-i+1) * x(i);
    end
  end

  return
end
