This is an old revision of the document!
Table of Contents
DM32 Curve Fit
CFIT Program from the Owner's Manual
State File
The listing from the Owner's Manual has been entered into the calculator and saved as a State File
Use
The program provides the usual set of Curve Fitting for Straight Line, Exponential, Logarithmic and Power curves, automating the same techniques as the manual method for DM15 described here DM15L Non-linear Curve Fit .
There is no “best fit” algorithm, which means you need to decide in advance which of the 4 curve types to fit, before entering the data. If you choose a different curve you have to enter the data again.
Choose a Curve
Each curve type has a separate program label
- XEQ S : Straight Line
- XEQ E : Exponential
- XEQ L : Logarithmic
- XEQ P : Power
Enter Data
Data is entered the same way whichever of the 4 programs is chosen.
- X-value R/S Y-value R/S
- X-value R/S Y-value R/S
- X-value R/S Y-value R/S
- X-value R/S Y-value R/S
Run the Curve Fit
Once all the data is entered you run the fit using XEQ R
This gives the various paramaters
- R-value (correlation coefficient) R/S
- B-value R/S
- M-value R/S
- Prompt for an x-value to use to calculate ŷ - enter a number R/S
- ŷ is shown for that x-value
- Prompt now for a y-value to use to calculate an estimate of x R/S
- x estimate is shown for that y-value
- Prompt for a new x-value to use to calculate ŷ R/S
- this goes on until you want to stop….
- press C to quit
Curve equations
- Straight Line
y = B + Mx - Exponential
y = BeMx - Logarithmic
y = B + M Ln(x) - Power
y = BxM
Examples
Logarithmic
| x | 0.3 | 1 | 2 | 3 | 4 | 5 |
| y | -1 | 2 | 3.8 | 5 | 5.6 | 6 |
Enter Data
- XEQ L
- 0.3 R/S 1 +/- R/S
- 1 R/S 2 R/S
- 2 R/S 3.8 R/S
- 3 R/S 5 R/S
- 4 R/S 5.6 R/S
- 5 R/S 6 R/S
Run the fit
- XEQ R
R=0.99932R/SB=2.05210R/SM=2.5359R/S- enter an x-value to calculate an estimate of y
- 2.5 R/S
y? 4.37571
- enter a y-value to calculate an estimate of x
- 0.8 R/S
X ? 0.61033
- finish C
Results
- The curve equation is
y = 2.05210 + 2.5359Ln(x) - The values for R, B and M are stored in register-variables
R,BandMfor future use- e.g. make an
EQN Y = B + M x Ln(X)- the equation can be evaluated, solved or integrated using the stored values for
BandM
Further Information
Page created : 17/04/26 08:35 BST
Page updated : 17/04/26 09:16 BST