12.07.2015 Views

GLE User Manual - Fedora Project Packages GIT repositories

GLE User Manual - Fedora Project Packages GIT repositories

GLE User Manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 9<strong>GLE</strong> Utilities9.1 FitlsThe FITLS utility allows an equation with n unknown constants to be fitted to experimental data.For example to fit a simple least squares regression line to a set of points you would give FITLS theequation: a*x+bFITLS would then solve the equation to find the best values for the constants a and b.FITLS can work with non linear equations, it will ask for initial values for the parameters so that asolution around those initial guesses will be found.FITLS writes out a <strong>GLE</strong> file containing commands to draw the data points and the equation it has fittedto them.Here is a sample FITLS session:$ fitlsInput data file (x and y columns optional) [test.dat,1,2] ? fitls.datLoading data from file, fitls.dat, xcolumn=1, ycolumn=2Valid operators: +, -, *, /, ^ (power)Valid functions:abs(), atn(), cos(), exp(), fix(), int()log(), log10(), not(), rnd(), sgn(), sin()sqr(), sqrt(), tan()Enter a function of ’x’ using constants ’a’...’z’e.g. a + b*x (standard linear least squares fit)sin(x)*a+ba + b*x + c*x^2 + d*x^3log(a*x)+(b+x)*c+aEquation ? sin(a*x)*b+c*x^2+dOutput file name to write gle file [fitls.gle] ?Precision of fit required, [1e-4] ?Initial value for constant a [1.0] ?Initial value for constant b [1.0] ?Initial value for constant c [1.0] ?Initial value for constant d [1.0] ?0 evaluations, 1 1 1 1 , fit = 1355.3620 evaluations, 1.97005 1 1 1 , fit = 1281.9540 evaluations, 1.97005 10.228 0.151285 1 , fit = 54.769460 evaluations, 2.01053 10.228 0.151285 1.06365 , fit = 54.1771...440 evaluations, -0.640525 -2.81525 0.13997 1.13871 , fit = 0.940192460 evaluations, -0.638055 -2.82934 0.140971 1.10502 , fit = 0.9384271

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!