function cdf = chebyshev1_cdf ( x )

%*****************************************************************************80
%
%% chebyshev1_cdf() evaluates the Chebyshev1 CDF.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 January 2019
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X, the argument of the CDF.
%
%  Output:
%
%    real CDF, the value of the CDF.
%
  cdf = zeros ( size ( x ) );

  i = find ( x < -1.0 );
  j = find ( -1.0 <= x & x <= 1.0 );
  k = find ( 1.0 < x );

  cdf(i) = 0.0;
  cdf(j) = 0.5 + asin ( x(j) ) / pi;
  cdf(k) = 1.0;

  return
end
