You are here: Symbol Reference > RegModels Namespace > Functions > RegModels.PowerEval Function
Stats Master VCL
ContentsIndex
Example

Evaluate power function for multiple values at the same time.

Uses MtxExpr, MtxVecTee, Series, RegModels;
procedure Example(Series1: TLineSeries);
var Y,X: Vector;
begin
  X.Size(100);
  X.Ramp(-5.0, 0.1); // x= -5.0, -4.9, ..., +4.9
  // Y = b[0] + b[1]*X
  PowerEval([1,3],X,Y);
  DrawValues(X,Y,Series1,false);
end;
#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
  PowerEval(OPENARRAY(double,(1.0, 3.0)),X,Y);
  DrawValues(X,Y,series,false);
}
Copyright (c) 1999-2024 by Dew Research. All rights reserved.