Re: [Discuss-gnuradio] curve fitting data points

2005-12-24 Thread mike revnell
I had a go at fitting a quadratic using the Scilab leastsq function. I ended up with the following: y = -3.6330888 + 0.3255432 * x + 0.0781971 * x^2 for whatever units the xdata and ydata arrays were in another message with the python code that seems to be doing much the same. The following s

Re: [Discuss-gnuradio] curve fitting data points

2005-12-23 Thread Robert McGwier
Perfect. Chuck Swiger wrote: Just thought while going to sleep last night, piecemeal linear or collecting several data points and doing linear interpolation betwen them should work fine. For (x1, y1) (x2, y2) (x3, y3) where x1 < x2 < x3 I can get slope m1 and y-intercept b1 between x1-x2,

Re: [Discuss-gnuradio] curve fitting data points

2005-12-23 Thread Chuck Swiger
At 07:06 AM 12/23/2005 -0500, Robert McGwier  wrote: If we know already, a priori, that the data is from a "smooth function", The phsical device has a smooth transfer curve ( MVAM109 capacitance / voltage ) and resonant frequency is a linear function of capitance ( f = 1 / ( 2 * pi * L * C  ) )

Re: [Discuss-gnuradio] curve fitting data points

2005-12-23 Thread Robert McGwier
Chuck, John: If we know already, a priori, that the data is from a "smooth function", that means (moving from left to right say), the extended line or the extended parabola from the last two or last three points respectively is always a very good predictor of the next point, then I would sugge

Re: [Discuss-gnuradio] curve fitting data points

2005-12-23 Thread John Aldridge
cswiger wrote: > This is for the mathematicians out there - what is a simple > working algorithm for creating a function model to fit an > arbitrary number of data points. You could try a least squares fitted polynomial http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html has a descri

[Discuss-gnuradio] curve fitting data points

2005-12-22 Thread cswiger
This is for the mathematicians out there - what is a simple working algorithm for creating a function model to fit an arbitrary number of data points. What I have for a first approximation, simple linear (y=mx+b) actually works better than nothing, but there's room for improvement. I set one frequ