You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Dew.Math.Units Namespace > Classes > Polynoms Class > Polynoms Methods > PolyEval Method > Polynoms.PolyEval Method (TVec, TVec, TMtx, int, double, TVec, TVec)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
Polynoms.PolyEval Method (TVec, TVec, TMtx, int, double, TVec, TVec)

Evaluate a polynomial.

Syntax
C#
Visual Basic
public static void PolyEval(TVec Val, TVec Coeff, TMtx R, int DegFreedom, double L2R, TVec Results, TVec Delta);
Parameters 
Description 
TVec Val 
Stores values doe which the polynomial will be evaluated (x values). 
TVec Coeff 
Stores polynomial coefficients for which the polynomial will be evaaluted. 
TMtx R 
Returns the Cholesky factor of the Vandermonde matrix. 
int DegFreedom 
Returns the residuals degree of freedom. 
double L2R 
Returns the L2 norm of the residuals. 
TVec Results 
Returns the results P(x), evaluated at Val. 
TVec Delta 
Returns the error estimates for Results. 

Evaluate a polynomial with coefficients Coeff at value Val. The order of polynomial (N) is determined as: N := Coeff.Length - 1. The algorithm employed uses Horners rule. The following formula is used to evaluate the polynomial: 

P(x) = coeff[0]*x^n + coeff[1]*x^(n-1) + .. + coeff[n] 

To estimate the error of polynomial interpolation after a call to PolyFit additional parameters have to be passed to the routine.

Copyright (c) 1999-2022 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!