octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #46126] Polyfit bug: Different polynomial coef


From: Nicole Dröge
Subject: [Octave-bug-tracker] [bug #46126] Polyfit bug: Different polynomial coefficients when using optional output
Date: Mon, 05 Oct 2015 11:07:38 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0

Follow-up Comment #2, bug #46126 (project octave):

Hi, 

ok. I think the doc is really a little bit irritating.
Maybe you change the order of explanations, something like this:

p = polyfit (x, y, n ) [Function File]
[p, s ] = polyfit (x, y, n ) [Function File]
Return the coeffients of a polynomial p(x) of degree n that minimizes the
leastsquares-error of the fit to the points [x, y].
The p olynomial co effients are returned in a row vector.
The optional output s is a structure containing the following filds:
‘R’ Triangular factor R from the QR decomposition.
‘X’ The Vandermonde matrix used to compute the polynomial coeffients.
‘df’ The degrees of freedom.
‘normr’ The norm of the residuals.
‘yf’ The values of the polynomial for each value of x.
The second output may be used by polyval to calculate the statistical error
limits
of the predicted values.

[p, s, mu] = polyfit (x, y, n ) [Function File]
When the third output, mu, is present the coeffients, p, are associated with a
polynomial in xhat = (x-mu(1))/mu(2). Where mu(1) = mean (x), and mu(2) = std
(x).
This linear transformation of x improves the numerical stability of the fit.


But I don't know if it fits to the guidelines for writing a doc.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46126>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]