utilizzazione di FIT per elaborazione dati
(funzione un poco complessa da spiegare ...lascio a esperti...)
# file dati per FIT # x,y valori # e terza colonna errori # 1 6 1 2 8 0.5 3 12 0.2 4 20 1 5 40 0.8 6 30 0.7 7 50 2 8 60 0.2 9 80 0.5 # # salvare come zdata.dat
disegna grafico prima della elaborazione
disegna grafico elaborato
richiamato file zdata.plt per visualizzare codice
#!/gnuplot # # # G N U P L O T # MS-Windows 32 bit version 3.7 # patchlevel 1 # last modified Fri Oct 22 18:00:00 BST 1999 # # Copyright(C) 1986 - 1993, 1998, 1999 # Thomas Williams, Colin Kelley and many others # # Type `help` to access the on-line reference manual # The gnuplot FAQ is available from # <http://www.ucc.ie/gnuplot/gnuplot-faq.html> # # Send comments and requests for help to <info-gnuplot@dartmouth.edu> # Send bugs, suggestions and mods to <bug-gnuplot@dartmouth.edu> # # set terminal windows # set output set noclip points set clip one set noclip two set bar 1.000000 set border 31 lt -1 lw 1.000 set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x,y set format x "%g" set format y "%g" set format x2 "%g" set format y2 "%g" set format z "%g" set angles radians set nogrid set key title "" set key right top Right noreverse box linetype -2 linewidth 1.000 samplen 4 spacing 1 width 0 set nolabel set noarrow set nolinestyle set nologscale set offsets 0, 0, 0, 0 set pointsize 1 set encoding default set nopolar set noparametric set view 60, 30, 1, 1 set samples 100, 100 set isosamples 10, 10 set surface set nocontour set clabel '%8.3g' set mapping cartesian set nohidden3d set cntrparam order 4 set cntrparam linear set cntrparam levels auto 5 set cntrparam points 5 set size ratio 0 1,1 set origin 0,0 set data style points set function style lines set xzeroaxis lt -2 lw 1.000 set x2zeroaxis lt -2 lw 1.000 set yzeroaxis lt -2 lw 1.000 set y2zeroaxis lt -2 lw 1.000 set tics in set ticslevel 0.5 set ticscale 1 0.5 set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set title "" 0.000000,0.000000 "" set timestamp "" bottom norotate 0.000000,0.000000 "" set rrange [ * : * ] noreverse nowriteback # (currently [0.000000:10.0000] ) set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) set urange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) set vrange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) set xlabel "" 0.000000,0.000000 "" set x2label "" 0.000000,0.000000 "" set timefmt "%d/%m/%y\n%H:%M" set xrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) set x2range [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) set ylabel "" 0.000000,0.000000 "" set y2label "" 0.000000,0.000000 "" set yrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) set y2range [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) set zlabel "" 0.000000,0.000000 "" set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) set zero 1e-008 set lmargin -1 set bmargin -1 set rmargin -1 set tmargin -1 set locale "C" f(x)=a*sin(x+b)+c (funzione da elaborare) a = 27.8387790817157 (valori elaborati) b = -11.9690486504873 c = 32.4603173532397
## fit f(x) "zdata.dat" using 1:2:3 via a,b,c (comando per elaborare con fit) # EOF
fasi elaborazione
automaticamente registratri nel file FIT.LOG presente nella
directory corrente:richiamato come file testo fit.log
evidenzia anche giorno e ora delle varie prove
descritta in questa pagina Fri Oct 13 10:51:46 2006
******************************************************************************* Fri Oct 13 10:22:07 2006
FIT: data read from 'xydata.dat' using 1:2:3 BREAK: No data to fit
******************************************************************************* Fri Oct 13 10:26:00 2006
FIT: data read from "xydata.dat" using 1:2:3 BREAK: No data to fit
******************************************************************************* Fri Oct 13 10:26:46 2006
FIT: data read from "xydata.dat" using 1:2 #datapoints = 9 residuals are weighted equally (unit weight)
function used for fitting: f(x) fitted parameters initialized with current variable values
Iteration 0 WSSR : 3075.54 delta(WSSR)/WSSR : 0 delta(WSSR) : 0 limit for stopping : 1e-005 lambda : 0.791963
initial set of free parameter values
a = 1.2345 b = 2.3456
After 10 iterations the fit converged. final sum of squares of residuals : 2975.59 rel. change during last iteration : -1.1783e-008
degrees of freedom (ndf) : 7 rms of residuals (stdfit) = sqrt(WSSR/ndf) : 20.6176 variance of residuals (reduced chisquare) = WSSR/ndf : 425.084
Final set of parameters Asymptotic Standard Error ======================= ==========================
a = -3.63314 +/- 9.506 (261.6%) b = 3.12878 +/- 2.741 (87.59%)
correlation matrix of the fit parameters:
a b a 1.000 b -0.030 1.000
******************************************************************************* Fri Oct 13 10:32:28 2006
FIT: data read from "zdata.dat" using 1:2:3 #datapoints = 9 function used for fitting: f(x) fitted parameters initialized with current variable values
Iteration 0 WSSR : 113392 delta(WSSR)/WSSR : 0 delta(WSSR) : 0 limit for stopping : 1e-005 lambda : 2.27053
initial set of free parameter values
a = 1.2345 b = 2.3456 c = 3.4567
After 11 iterations the fit converged. final sum of squares of residuals : 24359.2 rel. change during last iteration : -6.69528e-009
degrees of freedom (ndf) : 6 rms of residuals (stdfit) = sqrt(WSSR/ndf) : 63.717 variance of residuals (reduced chisquare) = WSSR/ndf : 4059.86
Final set of parameters Asymptotic Standard Error ======================= ==========================
a = 27.8388 +/- 13.92 (50%) b = -11.969 +/- 0.6856 (5.728%) c = 32.4603 +/- 15.64 (48.17%)
correlation matrix of the fit parameters:
a b c a 1.000 b -0.152 1.000 c -0.247 0.852 1.000
*******************************************************************************
Fri Oct 13 10:51:46 2006
FIT: data read from "zdata.dat" using 1:2:3 #datapoints = 9 function used for fitting: f(x) fitted parameters initialized with current variable values
Iteration 0 WSSR : 113392 delta(WSSR)/WSSR : 0 delta(WSSR) : 0 limit for stopping : 1e-005 lambda : 2.27053
initial set of free parameter values
a = 1.2345 b = 2.3456 c = 3.4567
After 11 iterations the fit converged. final sum of squares of residuals : 24359.2 rel. change during last iteration : -6.69528e-009
degrees of freedom (ndf) : 6 rms of residuals (stdfit) = sqrt(WSSR/ndf) : 63.717 variance of residuals (reduced chisquare) = WSSR/ndf : 4059.86
Final set of parameters Asymptotic Standard Error ======================= ==========================
a = 27.8388 +/- 13.92 (50%) b = -11.969 +/- 0.6856 (5.728%) c = 32.4603 +/- 15.64 (48.17%)
correlation matrix of the fit parameters:
a b c a 1.000 b -0.152 1.000 c -0.247 0.852 1.000