[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem of polyfit
From: |
Paul Kienzle |
Subject: |
Re: Problem of polyfit |
Date: |
Fri, 7 Oct 2005 09:11:26 -0400 |
On Oct 7, 2005, at 12:05 AM, Dmitri A. Sergatskov wrote:
Tetsuro KURITA wrote:
Following is an example which show that polyfit.m does not works well.
You would get a very good fit if you normalize your data
x = (x-mean(x))/(max(x)-min(x))
and the same with y.
I've modified wpolyfit so that
[p,s,mu] = wpolyfit(x,y,dy,n)
first centers and scales x by mu = [mean(x),std(x)]. I've used std(x)
rather than max(x)-min(x) for compatibility.
The fit is a whole lot nicer when you do this :-)
- Paul
-------------------------------------------------------------
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
-------------------------------------------------------------
- Re: Problem of polyfit, (continued)
- Re: Problem of polyfit, Paul Kienzle, 2005/10/06
- Re: Problem of polyfit, Tetsuro KURITA, 2005/10/06
- Re: Problem of polyfit, Paul Kienzle, 2005/10/06
- Re: Problem of polyfit, Tetsuro KURITA, 2005/10/06
- Re: Problem of polyfit, Dmitri A. Sergatskov, 2005/10/07
- Re: Problem of polyfit, Tetsuro KURITA, 2005/10/07
- Re: Problem of polyfit, Fredrik Lingvall, 2005/10/07
- Re: Problem of polyfit, Tetsuro KURITA, 2005/10/07
- Re: Problem of polyfit, Paul Kienzle, 2005/10/07
- Re: Problem of polyfit, Fredrik Lingvall, 2005/10/07
- Re: Problem of polyfit,
Paul Kienzle <=
Re: Problem of polyfit, Fredrik Lingvall, 2005/10/06
Re: Problem of polyfit, Dmitri A. Sergatskov, 2005/10/07
Re: Problem of polyfit, Henry F. Mollet, 2005/10/06