Evaluates b[0] + b[1]*X for given values in X vector, parameters in B array, and returns the results in XHat vector.
Size and Complex properties of XHat vector are adjusted automatically.
Use this version if you want to evaluate linear function for multiple values at the same time. This is a lot faster than calling single value version for each x value.
Evaluate linear function for multiple values at the same time.
#include "Math387.hpp" #include "RegModels.hpp" #include "MtxExpr.hpp" #include "MtxVecTee.hpp" void __fastcall Example(TLineSeries* series); { sVector X,Y; X.Size(100,false); X.Ramp(-5.0, 0.1); // x= -5.0, -4.9, ..., +4.9 LineEval(OPENARRAY(double,(1.0, 3.0)),X,Y); DrawValues(X,Y,series,false); }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|