Re: C for Polynomial Fit



On Sat, 29 Dec 2007 02:06:02 -0500, the renowned CBFalconer
<cbfalconer@xxxxxxxxx> wrote:

Gary Pace wrote:

Does anybody know where I can find code for a C function to fit
an (N-1)th order polynomial to N (x,y) data points. Actually I
need to fit a 5th order polynomial to 11 x,y points.

Simply look up the general art of "Least squares fit". Be advised
that the resultant matrices can be fairly unstable.

Indeed. If I was to be charged with designing code to fit data in
runtime I'd more than likely opt for something along the lines of a
cubic spline fit, which uses more data storage but is not as prone to
blow itself into smithereens (numerically speaking).


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@xxxxxxxxxxxx Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
.