function straightlinefit
Fit a straight line to data with errors in both coordinates
Syntax
result = straightlinefit(x, y, dx, dy [, chisq])
Arguments
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. |
Returns
The returned vector contains the best-fit parameters