help-octave
[Top][All Lists]
Advanced

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

Re: Problem of polyfit


From: Miroslaw Kwasniak
Subject: Re: Problem of polyfit
Date: Fri, 7 Oct 2005 17:13:43 +0200
User-agent: Mutt/1.5.9i

On Thu, Oct 06, 2005 at 07:55:03PM -0700, Henry F. Mollet wrote:
> I believe my problem was/is as follows:
> [P, S] = polyfit (x, y, 1)
> does not give me yf in the workspace unless I amend polyfit.m.
> Therefore I copied the result from the screen and I used yf = [paste]. I
> lost precision in this step. The rest was done line by line and yhat was in
> the workspace with high precision despite using default format.
> 
> So my question is how can I get yf (of polyfit) into my workspace without
> changing polyfit.m and without going to format long.
> Henry

See help for polyfit ;)

2.1.50: Function File: [P, YF] = polyfit (X, Y, N)
2.9.2:  Function File: [P, S] = polyfit (X, Y, N)
                           ^^^

So:

octave:2> x=1:2;[p yf]=polyfit (x,x,1); yf
yf =                                   ^^^^^^^^

  1  2

octave2.9:1> x=1:2;[p s]=polyfit (x,x,1); s.yf
ans =                                     ^^^^^^^^^

  1  2



-------------------------------------------------------------
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]