11-18-92
[address omitted]
Benbrook, TX 76126
LIST
5 Peri Lane
Valley Stream, NY 11581
Gentlemen,
Hi from a new member. I am a Mechaical Engineer by profession, and enclosed is a program for the newsletter. Naturally, it is technical in nature, like me. It is a curve fit program. Data is entered just once and 8 different curves may be tested to see how accurately they fit the data. the data is a set of x and y values. By regression, the curves produce a formula to approximate values of Y, given X. The coefficients for the equations as well as the accuracy (correlation) are computed. It works surprisingly fast, even on the trusty TS1000. Since it is written entirely in BASIC, it could be typed directly into a TS2068 also.
The best correlation is “1.0”. The closest curve to a correlation of 1.0 is the best “fit”. After selecting the best “fit”, the curve may be tested by inputting values of X and computing Y.
The only hang-up is that all data (X and Y), must be greater than 0. This is because for curves 2, 6, 7, and 8, logarithims of input data are computed. Since logs of negative numbers are undefined, this produces an error message. For negative data, the program would have to be modified by deleting the computations of logs (such as slnx, slny, etc.) The variable slnx means the sum of ln(x), in case you were wondering. This means curves 2, 6, 7, and 8 cannot be used for negative data.
This problem will be handled by a polynomial curve fit program that I also have (if there is interest in it). The polynonial curve fit can easily handle positive and negative data.
I would be interested to know reader feed back on this program.
Sincerely,
Don Berry