I have a file called "valeurs" with the following data :
247 21.2 253 23
250 22.3 257 24.2
254 23.3 260 25.2
258 24.3 266 26.3
264 26.5 275 28.3
273 28.6 283 30.6
279 30.6 292 32.7
288 32.6 301 34.6
297 34.6 310 36.5
305 36.6 318 38.5
314 38.6 328 40.6
325 40.5
I have an other file called valeurs.gnuplot with :
set terminal jpeg
set xlabel "Voltage en mV"
set ylabel "Temperature en degres celsius"
set title "Etalonnage du thermometre"
plot "valeurs" using ($1):($2) with linespoints title "Serie 1", "valeurs" using ($3):($4) with linespoints title "Serie 2"
That makes what I want, that means a graph. But now I would like to have a linear regression which calculate me the values of a and b (from y=ax+b) but I don't know how to do that … If someone could help me, that would be very nice !!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello
I have a file called "valeurs" with the following data :
247 21.2 253 23
250 22.3 257 24.2
254 23.3 260 25.2
258 24.3 266 26.3
264 26.5 275 28.3
273 28.6 283 30.6
279 30.6 292 32.7
288 32.6 301 34.6
297 34.6 310 36.5
305 36.6 318 38.5
314 38.6 328 40.6
325 40.5
I have an other file called valeurs.gnuplot with :
set terminal jpeg
set xlabel "Voltage en mV"
set ylabel "Temperature en degres celsius"
set title "Etalonnage du thermometre"
plot "valeurs" using ($1):($2) with linespoints title "Serie 1", "valeurs" using ($3):($4) with linespoints title "Serie 2"
That makes what I want, that means a graph. But now I would like to have a linear regression which calculate me the values of a and b (from y=ax+b) but I don't know how to do that … If someone could help me, that would be very nice !!!
You want to do a fit: then you just need the command "fit".
For more info type
help fit
in the gnuplot shell.
Edoardo
Hi
Thanks for the answer but I've found the solution before.