POLYEVAL
Revision as of 18:04, 27 April 2020 by ConvertBot (talk | contribs) (Evaluates a polynomial on a range of integers.)
Evaluates a polynomial on a range of integers.
<OUT> - Name of output file to write results to. <COEF> - Name of Data object in results table to read coefficients. <NDATA> - Number of points to evaluate at. <FORMAT> - Format of the output file. <START> - Sets abscissa start of the output file. <DELTA> - Sets abscissa delta of the output file. <UNITS> - Sets abscissa units of the output file. Evaluates a polynomial at integers between 0 and <NDATA> and outputs the results to <OUT>. The polynomial is gathered from a Data object in the results table having the same name as <COEF>. The object is assumed to be a double array containing the coefficients for the polynomial in increasing degree (1, x, x^2, etc.). FORMAT, START, DELTA, and UNITS are optional parameters. Examples: 1. The following will create a 4k element file, create a polynomial to fit the data, then evaluate the polynomial. fit_copy should be identical to fit. nM> wave in elem=4k form=SD nM> polyfit in 20 coef poly fit err nM> polyeval fit_copy coef 4k See Also: POLYFIT