home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / MISC / GLE33B_4.ZIP / GLE_MAN.ZIP / FITLS.HLP < prev    next >
Encoding:
Text File  |  1991-06-27  |  2.0 KB  |  58 lines

  1. The FITLS utility allows an equation with $n$ unknown constants to 
  2. be fitted to experimental data.
  3.  
  4. For example to fit a simple least squares regression line to a set of 
  5. points you would give FITLS the equation:
  6.  
  7.      a*x+b
  8.  
  9. FITLS would then solve the equation to find the {\em best} values for
  10. the constants $a$ and $b$. 
  11.  
  12. FITLS can work with non linear equations, it will ask for initial
  13. values for the parameters so that a solution around those initial
  14. guesses will be found.
  15.  
  16. FITLS writes out a GLE file containing commands to draw the data
  17. points and the equation it has fitted to them.
  18.  
  19. Here is a sample FITLS session:
  20.  
  21. $ fitls
  22. Input data file (x and y columns optional) [test.dat,1,2] ? fitls.dat
  23. Loading data from file, fitls.dat,  xcolumn=1, ycolumn=2
  24. Valid operators: +, -, *, /, ^ (power) 
  25. Valid functions:
  26.         abs(), atn(), cos(), exp(), fix(), int()
  27.         log(), log10(), not(), rnd(), sgn(), sin()
  28.         sqr(), sqrt(), tan()
  29.  
  30.  Enter a function of 'x' using constants 'a'...'z' 
  31.  e.g.    a + b*x   (standard linear least squares fit) 
  32.          sin(x)*a+b 
  33.          a + b*x + c*x^2 + d*x^3  
  34.          log(a*x)+(b+x)*c+a 
  35.  
  36. Equation ? sin(a*x)*b+c*x^2+d
  37. Output file name to write gle file [fitls.gle] ?
  38. Precision of fit required, [1e-4] ?
  39. Initial value for constant a [1.0] ? 
  40. Initial value for constant b [1.0] ? 
  41. Initial value for constant c [1.0] ? 
  42. Initial value for constant d [1.0] ? 
  43. 0 evaluations, 1 1 1 1 , fit = 1355.36 
  44. 20 evaluations, 1.97005 1 1 1 , fit = 1281.95 
  45. 40 evaluations, 1.97005 10.228 0.151285 1 , fit = 54.7694 
  46. 60 evaluations, 2.01053 10.228 0.151285 1.06365 , fit = 54.1771 
  47. .
  48. .
  49. .
  50. 440 evaluations, -0.640525 -2.81525 0.13997 1.13871 , fit = 0.940192 
  51. 460 evaluations, -0.638055 -2.82934 0.140971 1.10502 , fit = 0.93842 
  52. 480 evaluations, -0.63808 -2.82357 0.140993 1.10452 , fit = 0.938389 
  53. a = -0.638262 b = -2.81719 c = 0.140722 d = 1.11256 
  54.  
  55. 10 Iterations, sum of squares devided by n = 0.938389
  56. y = sin(-0.638262*x)*-2.81719+0.140722*x^2+1.11256
  57.  
  58.