help-octave
[Top][All Lists]
Advanced

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

Re: Automatic polynomial approximation


From: Joao Cardoso
Subject: Re: Automatic polynomial approximation
Date: Fri, 16 Oct 1998 19:10:32 +0100

Daniel Tourde wrote:

> Hello,
>
> I have a question concerning a polynomial approximation of a function
> within a given interval.
>
> I use the function polyfit to approximate a function by a polynom. To
> take the best approximation, I plot the function and it's approximation.
> If the approximation is not good enough, I simply change BY HAND the
> degree of approximation. I would like to automatize this process and not
> to bother about the best approximation but to be sure that Octave has
> chosen the best one by default. How could I do ?

Compute the residuals (mse) and if it is not bellow a certain level,
increase the degree.
Be carefull to not end up with an N degree polinomial equal to the number
of data points :-). You might add to the mse computation a cost term
dependent on the polinomial degree.


>
>
> Thanks in advance
>
>                         Daniel Tourde
> --
> *********************************************************************
> Daniel TOURDE                                   E-mail : address@hidden
> The Aeronautical Research Institute of Sweden   Tel : +46 8 634 13 44
> P.O. Box 11021 S-161 11 BROMMA, Sweden          Fax : +46 8  25 34 81
> *********************************************************************

--
Joao Cardoso                |   e-mail: address@hidden
INESC, R. Jose Falcao 110   |   tel:    + 351 2 2094322
4050 Porto, Portugal        |   fax:    + 351 2 2008487





reply via email to

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