Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gnuplot - linear fit with x-errors

Tags:

gnuplot

apologies if this is a very simple question, but I have searched everywhere and can't find a solution. I have a data file with three columns - x:y:xerrors. I want to fit a function f(x) to the data, by entering

f(x)=a*x+b
fit f(x) 'data' using 1:2:3 via a,b

But is this fit assuming that the entries in column 3 are y-errors, when actually they are x-errors?

like image 771
user3402961 Avatar asked Mar 15 '26 12:03

user3402961


1 Answers

Change: fit f(x) 'data' using 1:2:3 via a,b

To: fit f(x) 'data' using 1:2:3 with xerrorbars via a,b

This treats the 3rd column as the uncertainty in x and computes an appropriate weight for the WSSR.

like image 116
user3203278 Avatar answered Mar 18 '26 22:03

user3203278