help-octave
[Top][All Lists]
Advanced

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

Re: Problem of polyfit


From: Tetsuro KURITA
Subject: Re: Problem of polyfit
Date: Thu, 6 Oct 2005 19:34:51 +0900


 p = inv(X'*X)*X'*y
   = inv(X)*inv(X')*X'*y
   = inv(X)*I*y
   = inv(X)*y
   = X \ y

wpolyfit does the same with weighting on y, except that it uses QR decomposition to solve X \ y.

In generaly,

inv(a*b) \= inv(b)*inv(a)

If both of a and b are nonsingular matrixes, the following equation is right.
inv(a*b) = inv(b)*inv(a)

Acutually, in some case, polyfit.m give bad result.

=======================================================
 Tetsuro KURITA
  E-mail: address@hidden
=======================================================



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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