You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Classes > TMtxNonLinReg Class > TMtxNonLinReg Properties > TMtxNonLinReg.RegressFunction Property
Dew Stats for .NET
ContentsIndexHome
Example

In the following example we define general polynomial of second degree (three parameters) and also the procedure for derivatives:

// y=b0*x*x + b1*x + b2 i.e. parabola double SimpleParabola(TVec b, double x) { return b[0]*x*x + b[1]*x + b[2]; } // procedure for derivatives void SimplePabolaDeriv(TRegressFun RegressFun, double x, double y, double[] pars, TVec Grad) { Grad[0] = x*x; Grad[1] = x; Grad[2] = 1; } void Example(); { // ... Regress.MtxNonLinReg1.RegressFunction = SimpleParabola; Regress.MtxNonLinReg1.DeriveProcedure = SimpleParabolaDeriv; }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.