$LastChangedDate: 27-Juil-2011 $

# CL_evalPoly

Evaluation of polynom or polynom derivatives

## Calling Sequence

       val = CL_evalPoly(coeffs,t [,nd])

## Description

- Computes the value of a polynom or its derivatives.

  The polynoms are defined by the coefficients coeffs. Each row (number i) in coeffs contains the coefficients of the ith polynom. coeffs(i,k) is the coefficient of the term t^(k-1).

  The evaluation is done for each value in t.

  nd is the derivation order:

  - nd == 1 => first derivative

  - nd == 2 => second derivative

  - etc...

## Parameters

coeffs :

  Polynom coefficients. Each row corresponds to a different polynom. (PxM)

t :

  Values for the evaluation (1xN)

nd :

  (optional) Derivation order. Default is 0.

## Authors

- CNES - DCT/SB

## Examples

    // Example 1:
    coeffs = [0,1,2];  // P(x) = x + 2*x^2
    CL_evalPoly(coeffs,[0,1])
    CL_evalPoly(coeffs,[0,1],1) // P'(x) = 1 + 4*x
    CL_evalPoly(coeffs,[0,1],2) // P''(x) = 4;
    CL_evalPoly(coeffs,[0,1],3) // P'''(x) = 0;

    // Example 2:
    t=-0.05:0.001:0.05;
    coeffs = rand(500,3,"normal"); // 1000 2nd degree polynoms
    x = CL_evalPoly(coeffs,t);     // polynom values
    x2 = CL_evalPoly(coeffs,t,2);  // second derivative