help-octave
[Top][All Lists]
Advanced

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

Re: Polyfit Question


From: Ben Abbott
Subject: Re: Polyfit Question
Date: Tue, 17 Feb 2009 14:39:55 -0500

 
On Tuesday, February 17, 2009, at 02:15PM, "Thomas D. Dean" <address@hidden> 
wrote:
>I have used polyfit() with some success.  However, I seem to have a
>functionality problem in my head or something.
>
>X=[1329, 2204, 3584];
>Y=[15.75, 30, 65];
>[P,S,MU]=polyfit(X,Y,2);
>S.normr
>  ans =  1.7405e-14
>S.yf
>  ans = 15.750   30.000   65.000
>
>I expect this to be a pretty good fit
>
>polyval(P,X)
>ans =
>   9.2208e+06   2.5325e+07   6.6912e+07
>
>I expected P(X) near Y.
>
>Y=polyval(P,X,[],MU)
>Y =
>   15.750   30.000   65.000
>
>I expected to get this without using MU.
>
>Where is my head wrong?
>
>tomdean

Your polyfit/polyval are working as intended.

If you're confused by the description given by "help polyval" and "help 
polyfit", please propose a change.

Ben




reply via email to

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