function value = sine_transform_approximant ( n, a, b, s, nx, x );

%*****************************************************************************80
%
%% sine_transform_approximant() evaluates the sine transform approximant.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 December 2011
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of terms in the approximation.
%
%    real A, B, the interval over which the approximant was defined.
%
%    real S(N), the approximant coefficients.
%
%    integer NX, the number of evaluation points.
%
%    real X(NX), the evaluation points.
%
%  Output:
%
%    real VALUE(NX), the value of the approximant at the evaluationpoints.
%
  value = zeros ( nx, 1 );

  for i = 1 : nx
    for j = 1 : n
      value(i) = value(i) + s(j) * sin ( j * x(i) );
    end
  end

  value = value * sqrt ( 2 / ( n + 1 ) );

  return
end
