home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / mathapps.zip / readme.txt < prev    next >
Text File  |  1998-08-28  |  6KB  |  114 lines

  1. __________________________
  2. Installation:
  3. Place the .cmd files where ever you wish.  Make sure the DLL is in your LIBPATH or the directory in which you try to execute the programs.  Type the program name without any parameters will provide help.
  4.  
  5. REXX must be installed on your system.
  6.  
  7. __________________________
  8. Program descriptions:
  9.  
  10. 1. Convolution.cmd convolves a square kernel with a rectangular array of data.
  11.  
  12. 2. CurveFit2.cmd computes an nth order polynomial for a table of x,y values.
  13.  
  14. 3. SurfaceFit1.cmd computes a polynomial of degree 1 for n dimensions, given x1, x2, x3, ... y.
  15.  
  16. Both CurveFit2 and SurfaceFit1 use the Gauss-Jordan algorithm to perform least squares fits as outlined in Numerical Recipes.  The implementations were done in an attempt to make generic subroutines,  Therefore they work, but are relatively slow.  For my purposes though they are still plenty fast enough.  The approach is also rather brute force.  Numeric stability is potential problem, especially with surface fitting.  This can be greatly improved by increasing the numeric precision, for which see the comments internal to the code.  I am aware that there are also several techniques and approaches which are generally superior to the Gauss-Jordan, but I didn't code them (yet).  If anyone would like to share such implementations, please let me know.
  17.  
  18. I cannot warrant these programs in anyway.  They serve my needs.  They are not intended to be "industrial strength" tools.  If you have comments please feel free to send them.  As far as changing the format of the output, I am not likely to do this.  I assume someone who needs such changes can spend a little time and modify the formating statements, which is why I provide these as .cmd files rather than as .exe.  (After all, I've done the lion's share of the work, now it is your turn.  :-)  )
  19.  
  20. I note that often the output of these programs can be lengthy and wide.  Therefore running them under PMRexx may be very useful.
  21.  
  22. __________________________
  23. Copyrights:
  24.  
  25. Copyright by Doug Rickman, GHCC/MSFC/NASA  1998.
  26.  
  27. REXXLIB is copyrighted software belonging to Quercus Systems and is included with this software by permission of Quercus Systems.   Users of these programs are not permitted to use REXXLIB except in conjunction with your product. Any further use by an end user (except for evaluation) requires purchase of at least a basic registration.   
  28.  
  29. __________________________
  30. Example runs:
  31.    
  32. __________ Convolution.cmd ________________
  33.  
  34. [G:\source\MathApplications]convolution Conv.data Conv.kernel Conv.out
  35.  
  36. The file  CONV.OUT already exists, do you want it overwritten?
  37. Enter a "y" for yes, "h" will give help,
  38. any other response will abort processing.
  39.  
  40. Kernel weights:
  41.    0,   -1,    0, 
  42.   -1,    4,   -1, 
  43.    0,   -1,    0, 
  44. Number of weights: 5   Sum of weights: 0
  45.  
  46. Data values:
  47.    1.000,    1.000,    1.000,    1.000,   10.000,   10.000,   10.000,   10.000, 
  48.    1.000,    1.000,    1.000,    1.000,   10.000,   10.000,   10.000,   10.000, 
  49.    1.000,    1.000,    1.000,    1.000,   10.000,   10.000,   10.000,   10.000, 
  50.    1.000,    1.000,    1.000,    1.000,   10.000,   10.000,   10.000,   10.000, 
  51.   20.000,   20.000,   20.000,   20.000,   40.000,   40.000,   40.000,   40.000, 
  52.   20.000,   20.000,   20.000,   20.000,   40.000,   40.000,   40.000,   40.000, 
  53.   20.000,   20.000,   20.000,   20.000,   40.000,   40.000,   40.000,   40.000, 
  54.   20.000,   20.000,   20.000,   20.000,   40.000,   40.000,   40.000,   40.000, 
  55.  
  56. Filtered array:
  57.    0.000,    0.000,    0.000,   -9.000,    9.000,    0.000,    0.000,    0.000, 
  58.    0.000,    0.000,    0.000,   -9.000,    9.000,    0.000,    0.000,    0.000, 
  59.    0.000,    0.000,    0.000,   -9.000,    9.000,    0.000,    0.000,    0.000, 
  60.  -19.000,  -19.000,  -19.000,  -28.000,  -21.000,  -30.000,  -30.000,  -30.000, 
  61.   19.000,   19.000,   19.000,   -1.000,   50.000,   30.000,   30.000,   30.000, 
  62.    0.000,    0.000,    0.000,  -20.000,   20.000,    0.000,    0.000,    0.000, 
  63.    0.000,    0.000,    0.000,  -20.000,   20.000,    0.000,    0.000,    0.000, 
  64.    0.000,    0.000,    0.000,  -20.000,   20.000,    0.000,    0.000,    0.000, 
  65.  
  66. [G:\source\MathApplications]
  67.  
  68. __________ CurveFit2.cmd ________________
  69.  
  70. [G:\source\MathApplications]CurveFit2.cmd Curve.data 2 y
  71.  
  72. Solution:
  73. y =  0.182900419*x^2 + -1.84653670*x^1 + 12.1848484
  74.  
  75. Standard Error of Estimate = 4.21922114850597e-01
  76.  
  77.          x          y y estimate    delta    delta^2
  78. __________ __________ __________ __________ __________
  79.          0       12.0 12.1848484 1.848E-001 3.417E-002
  80.          1       10.5 10.5212121 2.121E-002 4.500E-004
  81.          2         10 9.22337668 7.766E-001 6.031E-001
  82.          3          8 8.29134207 2.913E-001 8.488E-002
  83.          4          7 7.72510830 7.251E-001 5.258E-001
  84.          5          8 7.52467538 4.753E-001 2.259E-001
  85.          6        7.5 7.69004328 1.900E-001 3.612E-002
  86.          7        8.5 8.22121203 2.788E-001 7.772E-002
  87.          8          9  9.1181816 1.182E-001 1.397E-002
  88.  
  89. [G:\source\MathApplications]
  90.  
  91.  
  92.  
  93. __________ SurfaceFit1.cmd ________________
  94.  
  95. [G:\source\MathApplications]SurfaceFit1.cmd surface.data surface.out
  96.  
  97. Solution:
  98. y = 48.1875002 + 7.8250000*x.1 + -1.75500002*x.2
  99.  
  100. Standard Error of Estimate = 9.85460720171027e+00
  101. The file  SURFACE.OUT already exists, do you want it overwritten?
  102. Enter a "y" for yes, "h" will give help,
  103. any other response will abort processing.
  104. y
  105.  
  106.  
  107. [G:\source\MathApplications]
  108.  
  109.  
  110.  
  111.  
  112.  
  113. Doug Rickman
  114. doug@hotrocks.msfc.nasa.gov