This function evaluates the parameters' value in
Note: The function doesn't return the estimated scale value, A, but the natural logarithm value of A, .
double get_exponent( vector & x_data, vector & y_data, double * pBase = NULL, double * pScaleExp = NULL, int * pScaleSign = NULL, bool bSortDataFirst = TRUE )
Return the exponent.
EX1
void get_exponent_ex1(Curve& crv) { vector vX, vY; vY = crv; Dataset dsX; crv.AttachX(dsX); vX = dsX; double dR0, y0, logA; int nScaleSign; dR0 = get_exponent(vX, vY, &y0, &logA, &nScaleSign); printf("dR0 = %.4lf, y0 = %.4lf, A = %.4lf.\n", dR0, y0, exp(logA)* nScaleSign); }
The function used for fitting function parameter initialization.
origin.h