【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.17.2.1.2 get_exponent
Contents
Description
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,
.
Syntax
double get_exponent( vector & x_data, vector & y_data, double * pBase = NULL, double * pScaleExp = NULL, int * pScaleSign = NULL, bool bSortDataFirst = TRUE )
Parameters
- x_data
- [input] X-coordinates of input points
- y_data
- [input] Y-coordinates of input points
- pBase
- [output] Estimated value of y0
- pScaleExp
- [output] Estimated value of log(abs(A))
- pScaleSign
- [output] Indicate whether A is positive(1) or negative(-1)
- bSortDataFirst
- [input] Indicate whether need to sort the points before calculation
Return
Return the exponent.
Examples
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); }
Remark
The function used for fitting function parameter initialization.
See Also
Header to Included
origin.h
/math-278c110016bc435d3e47234c59c020b7.png?v=0)