[time-nuts] exponential+linear fit

Joseph Gwinn joegwinn at comcast.net
Sat Oct 5 16:10:38 UTC 2013


Re: time-nuts Digest, Vol 111, Issue 21
On Sat, 05 Oct 2013 11:54:08 -0400, time-nuts-request at febo.com wrote:
> 
> Message: 6
> Date: Sat, 05 Oct 2013 08:53:52 -0700
> From: Jim Lux <jimlux at earthlink.net>
> To: time-nuts at febo.com
> Subject: Re: [time-nuts] exponential+linear fit
> Message-ID: <52503610.4040301 at earthlink.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> On 10/5/13 8:47 AM, Tim Shoppa wrote:
>> How slow of a processor are you working with? A modern PC using a general
>> purpose graphing and fitting tool (e.g. gnuplot) will fit tens of thousands
>> of points in a fraction of a second.
>> http://people.duke.edu/~hpgavin/gnuplot.html
>> 
>> If you want to do this in your own code, there are lots of least-squares
>> fitting examples in every first year numerical analysis textbook in every
>> computer language ever written (I learned this in FORTRAN 4 naturally).
>> http://en.wikipedia.org/wiki/Least_squares
>> 
>> If you have hardware substantially more primitive (e.g. a PIC, a bag of
>> 2N2222's and 555's, etc.) you have to do the fit on, then it's an
>> interesting problem :-)
>> 
> 
> In the future, more the latter than the former. 48 MHz ARM Cortex-M4, 
> for instance.
> 
> For now, though, yeah, it's on a not very fast PC (Windows Experience 
> Rating around 2), but compiled matlab does it very quickly.  But, given 
> that sooner or later I'm going to be heading for a more resource 
> constrained environment, or trying to FPGA it, I'm looking for simple 
> algorithms to implement the simplified models.
> 
> And, of course, I don't want to drag in all the libraries that one gets 
> with Matlab,Octave,gnuplot, etc.
> 
> They're great for figuring out what's going on and trying out the 
> algorithms.

There are lots of suitable subroutines available in "Numerical Recipes 
in C" by Press et al, that can be used as is, or as the starting point.

 <http://apps.nrbook.com/c/index.html>

Joe Gwinn




More information about the Time-nuts_lists.febo.com mailing list