According to the script and the function P = polyfitweighted2(x,y,z,9,w) and command polyval2(P,x,y),we able to make equation with coeff.which are made by function P.and evaluted the equation at a specific point like(X1,Y1).but my problem is :i couldn't get that equation to check and evaluate at the point which this command polyval2(P,x,y) gives me on output.i would like to ask you help me on making z equation .for example i reached to the equation after running the script and producing coefficients :
z=log(h): -0.0026-.0009(x^3)+0.0033(x^5)-0.0017(x^6)+0.003(x^7)-0.0004(x^6*y)+0.0004(x^4*y^3)-0.0002(x^3*y^4)+0.0001(x^2*y^5)
x=(B/H),y=phi..........at this (x=4 and y=0)point for evaluating fitted equation and checking the result of polyval2(P,x,y).it gives me z=log(h)=1.271....which h=e^1.271=3.56 but according to polyval2(P,x,y) output for this point gives us e^0.1936 =1.21??????
so my question is :is that equation which i have made with those coefficients correct???and why i couldnt get those evaluated number through the equation?also whats the W on a
> coefficients definition(wZ) on a script definition??