function straightlinefit

Fit a straight line to data with errors in both coordinates

result = straightlinefit(x, y, dx, dy [, chisq])

x:   the x values of the data to fit
y:   the y values of the data to fit
dx:   the errors in x
dy:   the errors in y
chisq:   If set to a named variable, the variable is overwritten with the chi-squared of the fit.

The returned vector contains the best-fit parameters