This widget could not be displayed.

From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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 
Search instead for 
Did you mean: 

inaccurate coefficients with Polynomial fit function

Solved!
Go to solution

Hello,

I don’t understand how using the General Polynomial fit function. I found inaccurate coefficients  (I’m beginner with Labview)

 

I need to calculate the coefficients (A, B, C, D) for this equation:  Y = A+BX+CX^2+DX^3.

With Excel I found 7 points to test the coefficient resolution with the Regression Solver.vi

The Regression Solver Results are different if I give 4, 5, 6 or 7 knowing points !!!

 

4 pts =>  y = -301.785E+0 + 4.261E+0x - 16.342E-6x^2 + 16.001E-12x^3  Smiley Sad
5 pts =>  y = +491.811E+3 - 380.684E-3x - 1.888E-6x^2 + 1.137E-12x^3  Smiley Happy
6 pts =>  y = +491.694E+3 - 379.525E-3x - 1.892E-6x^2 + 1.140E-12x^3 Smiley Happy

7 pts =>  y = -106.524E+3 + 2.334E+0x - 1.945E-6x^2 + 3.032E-12x^3  Smiley Sad

 

Why with 4 and 7 points the coefficients are wrong?

 

For helping you how I generate those results, you will found an Excel File and the VI in attachment.

 

Thanks a lot for your helps

 

Mark
 

Download All
0 Kudos
Message 1 of 2
(2,140 Views)
Solution
Accepted by topic author mbeuret

I have the solution.Smiley Happy

 

I use an another algorithm !!   Only one algorithm   give wrong results in a particular way and it is the default: SVD  Smiley Surprised

 

Mark

0 Kudos
Message 2 of 2
(2,122 Views)