# poly2D fit terms: secret decoder ring Hi,

When doing a poly2D fit of order n, how do I make the correlation to a specific term in W_Coef wave.

For example if a 3 order fit, I would get a wave with 10 points and I understand that k0 is the constant term. But how do the other points correspond to the terms in my fit?

CurveFit/NTHR=0/TBOX=768 poly2D 3, RealX /X={ImageX,ImageY} /D

Is there a standard way to assign the outpoint points in the w_coef wave?

Thanks

Andy
Hi,

Thanks for the insight on poly2d, that solved my immediate problem. However, the problem with solving the immediate problem is that you get a follow up problem.

I did the fit below and when I use poly2D with the coefficient wave I can get the predicted values and compare to the actuals. This is good.

Now for coefficients K0-K5 which of the polynomial term do they represent? Which are the linear terms, the squared terms, the cross term?

CurveFit/TBOX=768 poly2D 2, D268_Temperature /X={Air_Temperature,Solar_Radiation} /D
fit_D268_Temperature= poly2D(W_coef,x,y)
W_coef={61.639,-2.9922,-0.076167,0.064866,0.0026198,-1.1798e-05}
V_chisq= 3448.81;V_npnts= 728;V_numNaNs= 0;V_numINFs= 0;
V_startRow= 0;V_endRow= 727;
W_sigma={13.7,0.893,0.0142,0.0144,0.000432,3.88e-06}
Coefficient values ± one standard deviation
K0 =61.639 ± 13.7
K1 =-2.9922 ± 0.893
K2 =-0.076167 ± 0.0142
K3 =0.064866 ± 0.0144
K4 =0.0026198 ± 0.000432
K5 =-1.1798e-05 ± 3.88e-06

Thanks
hegedus wrote:

Coefficient values ± one standard deviation
K0 =61.639 ± 13.7
K1 =-2.9922 ± 0.893
K2 =-0.076167 ± 0.0142
K3 =0.064866 ± 0.0144
K4 =0.0026198 ± 0.000432
K5 =-1.1798e-05 ± 3.88e-06

Quoting the help file that was suggested above:

"Among coefficients for a given degree, those for terms having higher powers of X are first. Thus, poly2D returns, for a coefficient wave cw:
f(x,y) = cw + cw*x + cw*y + cw*x^2 + cw*x*y + cw*y^2 + ..."

So, your fit means f(x,y) = 61.639 - 2.9922*x - 0.076167*y + 0.064866*x^2 + 0.0026198*x*y - 1.1798e-5*y^2.