Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>poly_fit()</b> t_exam14 http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
POLY_FIT()                                                         T_EXAM14
   Fits buffer data to polynomial equation up to 5th degree.

   Syntax
         POLY_FIT(nColumn,nDegrees [,nShowLine])

   Arguments
         nColumn     Sets the Y column number.
         nDegrees    Sets the nth degree polynomial equation.
         nShowLine   Sets the line on or off. [Default is ON]

   Returns
         RET_NUM()   Returns the element number.
         RET_R2()    Returns the coefficient of determination.
         RET_DF()    Returns the degrees of freedom.
         RET_BCOEF() Returns the equation coefficients.
         SCI_NOT()   Returns the base of a number.
         RET_EXPON() Returns the exponent of above value.

   Description
         POLY_SEG() can be used to set the length of line segments used to
         draw the curve.

         POLY_FIT() develops the best fit line through a set of points. A
         straight line can be fit by the method of least squares and results
         in the equation: Y = mX + b or Y = B0 + B1X.

         The second degree polynomial is as follows:
                           2
         Y = B0 + B1X + B2X   (The two above denotes an exponent of 2)

         The POLY_FIT() polynomial curve fitting function will fit up to a
         5th-degree polynomial:
                           2     3     4     5
         Y = B0 + B1X + B2X + B3X + B4X + B5X

         Degrees can be in the range of 2-5. However, you must have as many
         data rows as there are degrees. Because polynomial equations can have
         very small values for B, a function has been included to convert a
         value to scientific notation.

See Also: POLY_PLOT() REGRESS() SPLINE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson