Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | utility | |
Module | fitting | |
Tool | functionfitter |
This function returns the standard errors of the unknowns in the fit.
- include 'functionfitter.g' - ff := functionfitter() - x := 1:10 - y := 2 + 3*x - ff.setdata (x, y) - ff.setfunction ('p0 + p1*x') - ff.fit(linear=T) # Solution perfect like data [2 3] - ff.geterror() # Errors 0 as data perfect [0 0] - - include 'randomnumbers.g' # Add some noise to data - r := randomnumbers() - g := r.normal(0,0.1,10) - y +:= g; - ff.setdata (x, y) - ff.fit(linear=T) # Now fit and errors non-perfect [1.96462 2.98964] - ff.geterror() [0.178235 0.0287251]