|
From: smms <sm...@ho...> - 2013-12-09 20:02:20
|
I am trying to fit my data and control their lengths between b x_min x_max. So renamed my functions with corresponding x_min and x_max values. But not succeeding to control their length. Any suggestion pls? Many thanks and here are my data and codes. x1 y1 sd1 x2 y2 sd2 x3 y3 sd3 611.75 44.330 2.015 638.65 41.417 1.848 627.4 45.311 4.668 640.65 42.821 2.161 619.10 47.912 1.176 607.0 56.682 2.234 637.35 49.475 2.672 623.95 50.669 3.419 584.5 62.197 2.266 617.00 52.755 2.917 602.20 55.996 1.508 522.0 70.550 4.751 602.30 59.032 3.325 530.95 71.744 3.519 413.5 80.528 4.412 545.90 67.169 3.351 436.20 80.660 2.877 286.9 87.453 4.542 467.40 84.709 5.217 372.35 84.351 3.640 209.3 89.979 2.185 336.50 90.083 4.053 249.50 96.568 3.355 96.8 96.859 3.476 f8(x) = a8*x*x+b8*x+c8 f_p(x, min, max) = (x >= min && x <= max) ? f8(x) : 1/0 fit f_p(x,min,max) 'data.txt' u 1:2 via a8,b8,c8 plot 'data.txt' u 1:2:3 w errorbars t '800', f_p(x,min,max) t 'f(800)' min=250 ; max=624; f10(x) = a10*x*x+b10*x+c10 f_q(x, min, max) = (x >= min && x <= max) ? f10(x) : 1/0 fit f_q(x,min,max) 'data.txt' u 4:5 via a8,b8,c8 replot 'data.txt' u 4:5:6 w errorbars t '1000', f_q(x,min,max) t 'f(1000)' min=97 ; max=585; f12(x) = a12*x*x+b12*x+c12 f_q(x, min, max) = (x >= min && x <= max) ? f12(x) : 1/0 fit f_q(x,min,max) 'data.txt' u 7:8 via a12,b12,c12 replot 'data.txt' u 7:8:9 w errorbars t '1200', f_q(x,min,max) t 'f(1200)' -- View this message in context: http://gnuplot.10905.n7.nabble.com/problem-controlling-fit-length-within-given-x-values-tp17882.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |