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

Evaluates a polynomial with coefficients Coeff at complex value Val and returns complex results.

Syntax
C#
Visual Basic
public static TCplx PolyEval(TCplx Val, TVec Coeff);

Evaluates a polynomial with coefficients Coeff at complex value Val and returns complex results.

using Dew.Math; using Dew.Math.Units; using Dew.Math.Tee; namespace Dew.Examples { private void Example() { Vector X = new Vector(0); Vector Y = new Vector(0); Vector Coeff = new Vector(0); X.Size(10); X.Ramp(-5,1); // X = [-5,-4,-3,-2,-1, 0, 1, 2, 3, 4] // construct a parabola Coeff.SetIt(false,new double[] {2, -1, 3}); Polynoms.PolyEval(X,Coeff,Y); // Y now holds the values of polynomial, evaluated at all X.Values MtxVecTee.DrawIt(X,Y,"Parabola",false); } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!