NAME

linfit

SYNOPSIS

linfit [xc=] [yc=] [zc=] [order=] [fit] [noexp]

DESCRIPTION

linfit reads data from stdin and performs a linear least square fit using the first column as the x values and the second column as the data to be fitted. The column numbers can be changed by command line switches. The default value is a first order (line) fit, higher orders can be selected from the command line. If xc=0 then a fit to the line count is made.

If the fit keyword is not used the program prints out he values of the best fitting line. For example:

a0=0.20000000 a1=2.35000000 rms=0.6363961
Where the first two fields are the intercept and slope of the line, and the last field is the root mean square value of the difference between the data and the fit.

Lines starting with the # character are ignored.

OPTIONS

fit - the values and the residuals are printed to stdout.

noexp - causes the output coefficients to be printed without the exponentional format.

zc= is specified, a second term combining the data in the third column is fit.

order= changes the polynomial order from linear (2) to something else.


Program index