Evaluates the first derivative of a polynomial. More...
Go to the source code of this file.
Namespaces | |
| namespace | belfem |
| USER GUIDES: | |
Functions | |
| template<typename T> | |
| T | belfem::dpolyval (const Vector< T > &aCoeffs, const T aX) |
| Evaluates the first derivative of a polynomial at one point. | |
Evaluates the first derivative of a polynomial.
Coefficient order is descending: aCoeffs(0) is the coefficient of the highest power and the last entry is the constant term, so a vector of length n+1 describes a polynomial of degree n. This is the convention Armadillo and MATLAB use, and it is the opposite of the ascending order some other libraries take. Getting it backwards produces a plausible-looking wrong answer rather than an error.