07-14-2017 06:58 AM
Thank you very much,this method is good for showing the result .
here i met a big problem about the coefficients ,i typed the same value into the polynomial ,and got the result "Z" ,but i really can not understand that there is different value between the best fit result 。
07-14-2017 09:55 AM - edited 07-14-2017 10:09 AM
Looking at the formula, the coefficients c10, c11, c12 are defined slightly differently. Mine are pure and only depend on x and y, while in your case they also depend on c0..c6. It seems ill advised to mix these terms and that's why I changed it. If some coefficients depend on other coefficient, the problem cannot be solved this way.
Do you have a publication that describes the theory behind all this? Are you sure your formula is correct?
07-14-2017 10:04 AM - edited 07-14-2017 10:05 AM
Here I quickly modified your formula so it agrees with the graphical code. Now the results are the same between the two methods (there will probably be slight binary differences due to DBL limitations and operation reordering).
07-16-2017 01:15 AM
thank you very much ,i got it ,it looks a little bit complicated to get the surface from the raw data directly ,especially when your raw data just one X -one Y -one Z .:)
thanks again for your great help
07-16-2017 06:52 AM - edited 07-16-2017 06:57 AM
That's why I generate a grid of equally spaced x and y values. Now the z values based on the best fit can just be generated with a simple matrix multiplication.
You can wrap it all into a subVI. (xmi, xmax, ymin, ymax, # of grid lines >> surface)
My version is not complicated, only yours is! So don't use a formula node all all that complicated stuff that is hard to debug.