Polyfit with scaling
Ben Abbott
bpabbott at mac.com
Mon Feb 4 18:16:02 CST 2008
On Feb 4, 2008, at 4:21 PM, Dmitri A. Sergatskov wrote:
> -- if std(x) == 0 then it means that all x are the same number (I
> would also argue that one
> may want to compare to eps rather than 0). In that case we cannot
> do any fits,
> so probaly should just exit with an error.
Moving the bar to something greater than zero will be a problem if the
x values are small to begin with. Instead, I think we should make a
comparison relative to the mean.
How about "if std(x) < mean(x)*eps" ?
Regarding returning an error, if the algorithm functions without
error, I'd prefer not to artificially introduce one. For example, if
the order of the polynomial is zero, then constant values of x and/or
y are not a problem.
Ben
More information about the Octave-maintainers
mailing list