From: Hans-Bernhard B. <HBB...@t-...> - 2010-02-23 23:20:30
|
Guilherme Poleszuk wrote: > I believe that are a problem with "fit" function when I use xdata time, > because X values are converted to second since 2000/01/01 ( I think! ) and > this number get big compared to Y values... Exactly. Fit is somewhat allergic to parameter values of wildly different magnitude. The issue is not unique to time-date axes, but those do have a tendency to get hit by it more often than others because they tend to pick up big figures, like the number of seconds in a day (or a year, even), as factors that end up in the parameters. The solution is to shift or scale the problem to get the expected parameters into similar magnitude ranges. E.g. it might help to define your model function to take days instead of seconds as its argument fit f(x/86400) 'data' u 1:4 via a, b or (like Thomas suggested already), shift the zero point of your x axis. Note that the usual simple forms of the straight line equation y = m*x + y0 y = m*(x -x0) may suffer from ginormous extrapolation from a very short piece of curve all the way to the point of x=0 (or y=0), causing parameters like x0 or y0 to be entirely dominated by rounding error. |