IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 21, 2005, 4:47:16 PM (21 years ago)
Author:
gusciora
Message:

The nX terms for the polynomials now refer to the order, not the number
of terms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psStats.c

    r4991 r5090  
    1717 *
    1818 *
    19  *  @version $Revision: 1.145 $ $Name: not supported by cvs2svn $
    20  *  @date $Date: 2005-09-11 22:18:40 $
     19 *  @version $Revision: 1.146 $ $Name: not supported by cvs2svn $
     20 *  @date $Date: 2005-09-22 02:47:16 $
    2121 *
    2222 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    15021502    psVector *y = psVectorAlloc(3, PS_TYPE_F64);
    15031503    psVector *yErr = psVectorAlloc(3, PS_TYPE_F64);
     1504    // XXX: Why was this 2 when the alloc function specified number of terms?  Note: it's correct now.
    15041505    psPolynomial1D *myPoly = psPolynomial1DAlloc(2, PS_POLYNOMIAL_ORD);
    15051506
     
    15521553
    15531554        // Determine the coefficients of the polynomial.
    1554         //        myPoly = psVectorFitPolynomial1D(myPoly, x, y, yErr);
    15551555        myPoly = psVectorFitPolynomial1D(myPoly, NULL, 0, y, yErr, x);
    15561556        if (myPoly == NULL) {
     
    18271827        }
    18281828
    1829         psPolynomial1D *tmpPoly = psPolynomial1DAlloc(3, PS_POLYNOMIAL_ORD);
     1829        psPolynomial1D *tmpPoly = psPolynomial1DAlloc(2, PS_POLYNOMIAL_ORD);
    18301830        // XXX: What about the NULL x argument?
    18311831        tmpPoly = psVectorFitPolynomial1D(tmpPoly, NULL, 0, y, NULL, NULL);
Note: See TracChangeset for help on using the changeset viewer.