LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Polyfit forced through the origin?

Solved!
Go to solution

Is there an easy way to force a 3rd order polyfit through the origin or constrain it through a point??

0 Kudos
Message 1 of 4
(6,770 Views)

The General Polynomial Fit allows you to constrain coefficients but not through fixed points.

0 Kudos
Message 2 of 4
(6,761 Views)
Solution
Accepted by topic author Deastman

The easiest way (using the functions available in LV) is to set a high weighting to the point you want to cross.

For instance set the weighting to 1 for all points except the origin where you can use a weighting of 100000 or so.

 

Message 3 of 4
(6,758 Views)

This worked... I created a weighted array populated with conditionally set weightings for the points that I needed to force the polyfit through.  Thanks for your help!

0 Kudos
Message 4 of 4
(6,749 Views)