The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... 
Home MathPack Math2 Class TCurveFit Methods CalcPowerFit  
See also: CalcLinFit, CalcParabolFit, CalcPolyFit, CalcHoerlFit, CalcExponentialFit  
CalcPowerFit 

The procedure CalcPowerFit calculates the best fitting power curve for a given set of data. The curve is determined by the equation
The values of x and y are given by the data samples, the parameters k0 and k1 are estimated by CalcPowerFit using a least squares approximation. An exception is raised if the fit cannot be calculated (i.e. if the xvalues are too large). The following diagram shows the various types of curves which can be generated by the power function:
The data points [x,y] have to be entered using the routine EnterStatValue. A minimum number of 3 values is required in order to apply CalcPowerFit. Do not forget to reset the statistics calculation before entering any new data sets (use the method Init). In addition to the parameters k0 and k1, CalcPowerFit calculates the quality of fit FitQual. This parameter may vary between 0.0 and 1.0, indicating the best possible fit if FitQual equals 1.0.
