📄 curvefit.txt
字号:
This zip file contains a Delphi 4 (and 5) version of Allen Miller's Curve
Fitting routine (from: the book "Pascal Programs For Scientists And
Engineers", typed and submitted to MTPUG in Oct. 1982 by Juergen Loewner,
and corrected and adaptated for Turbo Pascal by Jeff Weiss.
I have updated these routines to work with Delphi 4's open array
parameters. which allows the routine to be generalised so that it is
no longer hard-coded to make a specific order of best fit or work with
a specific number of points.
The routine also works with Delphi 5 (and probably 6 and 7), and the
testbed program runs under Delphi 5. Ensure that the unit CurveFit.pas
is somewhere on the testbed's library path.
Richard Kavanagh (r.kavanagh@daelnet.net) kindly supplied a C++ version
which is included as the archive PolyFitC++.zip
RELEASE HISTORY
2003 Mar 05 Kelvin Lee spotted an error when all Y values were the same,
causing a divide by zero when calculating the correlation
coefficient. Now fixed.
2003 Jun 12 Added missing PreCH.h include definitions to PolyFitC++.zip
HINTS
Warren Postma noted:
Can anyone suggest to me the proper way to calculate the solution for
fitting a set of (X,Y) pairs that is like the 1st order (linear)
equation y = mx + b, but forced through a certain value of b?
Okay, it turns out that the Polyfit equation can be used for this, by
putting the data in twice (doubled), the first set of data is normal,
the second set, all the X and Y values are multiplied by -1. This
creates a "mirror image" of the data, and the curve that is fitted
always goes through (0, 0).
Nice one, Warren!
David J Taylor, Edinburgh
2005 Feb 04
Web site: www.satsignal.net
E-mail: davidtaylor@writeme.com
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -