HOME GUIDE OPERATIONS DOCS ERRORS FORMATS INSTALL NEW TIPS WEB SITES

PL FIT - FIT PoLynomial to document file data

(1/26/96)

PURPOSE

Fit a polynomial y=f(x) of degree < 10 to a set of x,y measurements stored in a document file. Evaluated polynomial points can be stored in a new document file.

SEE ALSO

PL [Plot doc. file data into CNT meta-file]
PL HI [Plot histogram from doc. file into CNT meta-file]

USAGE

.OPERATION: PL FIT X10,X11,X12...

.DOCUMENT FILE: DOC001
[Enter name of input document file.]

.FIRST, LAST KEY NUMBER: 4,45
[Enter first and last key under which the measurements are stored in the document file (it is not possible to leave gaps).]

.COLUMN #S FOR ABSCISSA, ORDINATE (0=KEY): 2,5
[Enter the columns where x and y are stored.]

.SCALEX, SCALEY (DEF=1): 10.5,1
[Enter the size of the x and y units. e.g. if the key is used for x each increment by 1 in the key could be an increment of 10.5 in x.]

.ORDER OF POLYNOM (1-10, DEF=1): 3
[Enter the order of the polynomial that will be fitted to the data. In the example shown the polynomial a+bx+cx**2+dx**3 will be used. The output are the coefficients a,b,c,d. They are printed in the output and also stored in the (optional) registers e.g. X10,X11,X12....]

.CREATE OUTPUT DOCUMENT FILE (Y/N): Y
[If Y is selected the polynomial is calculated over a specified range and stored as x, y pairs in a document file.]

If answer is 'Y' following questions appear:

.X FROM, TO: 0.8, 30.7
[Enter range over which the polynomial is to be calculated. Note: the actual range has to be entered; SCALEX is not used for the calculation of the polynomial.]

.IN INTERVALS OF: 0.4
[Enter interval between the calculated points. Note: (XMIN-XMAX)/XIN = (TO-FROM)/INTERVAL+1 currently must not exceed 9999 because only 9999 value pairs can be stored in a document file.]

.DOCUMENT FILE: DOC002
[Enter name of output document file. The lines in this Document file will have the format:
KEY 2 x-value y-value. ]

SUBROUTINES

POLLSQ, POLFIT

CALLER

PLOT1

© Copyright Notice /       Enquiries: spider@wadsworth.org