function c2 = poly_deriv ( c1 )

%*****************************************************************************80
%
%% poly_deriv returns the derivative of a polynomial.
%
%  Discussion:
%
%    The power sum form of a polynomial is:
%
%      p(x) = c(0) + c(1) * x + ... + c(n-1) * x^(n-1) + c(n) * x^(n)
%
%    Because MATLAB doesn't allow 0 indexing, we use an adjusted formula:
%
%      p(x) = c(1) + c(2) * x + ... + c(n) * x^(n-1) + c(n+1) * x^(n)
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    24 May 2005
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real C1(D1+1): the polynomial coefficients.
%    C1(I+1) is the coefficient of X^I.
%
%  Output:
%
%    real C2(D2+1): the coefficients of the derivative polynomial.
%
  d1 = length ( c1 ) - 1;
  d2 = d1 - 1;

  for i = 0 : d2
    c2(i+1) = ( i + 1 ) * c1(i+2);
  end

  return
end
