From Thursday, May 23rd (05:00 PM CDT) through Friday, April 24th (1:30 AM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## 回复： User defined high degree polynomial fit (surface fitting)

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 。

Message 11 of 15
(753 Views)

## 回复： User defined high degree polynomial fit (surface fitting)

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?

Message 12 of 15
(741 Views)

## 回复： User defined high degree polynomial fit (surface fitting)

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).

Message 13 of 15
(738 Views)

## 回复： User defined high degree polynomial fit (surface fitting)

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

Message 14 of 15
(725 Views)

## 回复： User defined high degree polynomial fit (surface fitting)

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.

Message 15 of 15
(721 Views)