You are here: Symbol Reference > Polynoms Namespace > Functions > Polynoms.PolyEval Function
MtxVec VCL
ContentsIndex
Example
uses MtxExpr, Math387, MtxVec, MtxVecEdit, MtxVecTee,Polynoms; procedure TForm1.Button1Click(Sender: TObject); var X, Y, Coeff: Vector; begin X := Ramp(10,-5,1); // X = [-5,-4,-3,-2,-1, 0, 1, 2, 3, 4] // construct a parabola Coeff.SetIt(false,[2, -1, 3]); PolyEval(X,Coeff,Y); // Y now holds the values of polynomial, evaluated at all X.Values DrawIt(X,Y,'Parabola'); end;
#include "MtxExpr.hpp" #include "Polynoms.hpp" #include "MtxVecTee.hpp" #include "MtxVecEdit.hpp" void __fastcall TForm1::BitBtn1Click(TObject *Sender) { sVector X,Y,Coeff; X.Size(10,false); X.Ramp(-5,1); // X = [-5,-4,-3,-2,-1, 0, 1, 2, 3, 4] // construct a parabola Coeff.SetIt(false,OPENARRAY(double,(2, -1, 3))); PolyEval(X,Coeff,Y); // Y now holds the values of polynomial, evaluated at all X.Values DrawIt(X,Y,"Parabola",false); }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.