Evaluate a polynomial for given abscissa using time efficient Horner's scheme.
function polyEval input Real c[:] "Polnomial coefficients"; input Real u "Abscissa value"; output Real y "= c[1] + u*(c[2] + u*(c[3] + u*(c[4]*u^3 + ...)))"; end polyEval;
Date | Description | ||
---|---|---|---|
June 22, 2015 |
|