On Wed, 7 Nov 2007, Tom Collins wrote: > I'm not familiar with octave, so I don't know how you use it to generate the > coefficient list. Everything I've seen online with thermocouples uses > coefficients like: > > c0 + c1 * x + c2 * x^2 + c3 * x^3 + c4 * x^4 + ... cn + x^n > > The polycomp routine appears to do it a different way: > > (x * (x * (x * a0 + a1) + a2) + a3) > > I have come across lists of the first style, but it would be a little tricky > to convert from one to the other, I imagine (linear algebra to solve?).
Actually, they are exactly the same - the second is just evaluated with horner's scheme, which is faster and more numerically stable. In your example a0=c3, a1=c2, a2=c1 a3=c0 http://en.wikipedia.org/wiki/Horner_scheme njh ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Owfs-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/owfs-developers
