<-[[.:start]] ====== 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 {{ :public:calculator:guides:cfit.d32 |}} ===== 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_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.99932'' R/S * ''B=2.05210'' R/S * ''M=2.5359'' R/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 R/S (what is x-value where the curve crosses the x-axis at y = 0? The solution to the equation) * ''X ? 0.44520'' * 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'', ''B'' and ''M'' for 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 ''B'' and ''M'' * Until a new Curve fit program is run, or anything is done to change the Statistics Registers, you can re-run the fit with XEQ 'R' to allow more y and x estimates to be made ===== Further Information ===== {{tag>calculator dm32}} Page created : 17/04/26 08:35 BST Page updated : ~~LASTMOD~~