From: Saga on
Guys trying to create a polynomial formula but I go above order 5 i get this error msg "Warning: Polynomial is badly conditioned. Add points with distinct X
values, reduce the degree of the polynomial, or try centering
and scaling as described in HELP POLYFIT."

I've looked at help, but there is no information there.

Thanks
From: Steven Lord on

"Saga " <a5stargamescompany(a)googlemail.com> wrote in message
news:hmof3l$851$1(a)fred.mathworks.com...
> Guys trying to create a polynomial formula but I go above order 5 i get
> this error msg "Warning: Polynomial is badly conditioned. Add points with
> distinct X
> values, reduce the degree of the polynomial, or try centering
> and scaling as described in HELP POLYFIT."
>
> I've looked at help, but there is no information there.

Reread this section from the help:

[P,S,MU] = POLYFIT(X,Y,N) finds the coefficients of a polynomial in
XHAT = (X-MU(1))/MU(2) where MU(1) = MEAN(X) and MU(2) = STD(X). This
centering and scaling transformation improves the numerical properties
of both the polynomial and the fitting algorithm.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: Saga on
"Steven Lord" <slord(a)mathworks.com> wrote in message <hmoggi$as7$1(a)fred.mathworks.com>...
>
> "Saga " <a5stargamescompany(a)googlemail.com> wrote in message
> news:hmof3l$851$1(a)fred.mathworks.com...
> > Guys trying to create a polynomial formula but I go above order 5 i get
> > this error msg "Warning: Polynomial is badly conditioned. Add points with
> > distinct X
> > values, reduce the degree of the polynomial, or try centering
> > and scaling as described in HELP POLYFIT."
> >
> > I've looked at help, but there is no information there.
>
> Reread this section from the help:
>
> [P,S,MU] = POLYFIT(X,Y,N) finds the coefficients of a polynomial in
> XHAT = (X-MU(1))/MU(2) where MU(1) = MEAN(X) and MU(2) = STD(X). This
> centering and scaling transformation improves the numerical properties
> of both the polynomial and the fitting algorithm.
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
>

OK I understand it, but have no idea how to apply the method?

Thanks
From: Steven Lord on

"Saga " <a5stargamescompany(a)googlemail.com> wrote in message
news:hmoh72$qvk$1(a)fred.mathworks.com...
> "Steven Lord" <slord(a)mathworks.com> wrote in message
> <hmoggi$as7$1(a)fred.mathworks.com>...
>>
>> "Saga " <a5stargamescompany(a)googlemail.com> wrote in message
>> news:hmof3l$851$1(a)fred.mathworks.com...
>> > Guys trying to create a polynomial formula but I go above order 5 i get
>> > this error msg "Warning: Polynomial is badly conditioned. Add points
>> > with distinct X
>> > values, reduce the degree of the polynomial, or try centering
>> > and scaling as described in HELP POLYFIT."
>> >
>> > I've looked at help, but there is no information there.
>>
>> Reread this section from the help:
>>
>> [P,S,MU] = POLYFIT(X,Y,N) finds the coefficients of a polynomial in
>> XHAT = (X-MU(1))/MU(2) where MU(1) = MEAN(X) and MU(2) = STD(X). This
>> centering and scaling transformation improves the numerical
>> properties
>> of both the polynomial and the fitting algorithm.
>>
>> --
>> Steve Lord
>> slord(a)mathworks.com
>> comp.soft-sys.matlab (CSSM) FAQ:
>> http://matlabwiki.mathworks.com/MATLAB_FAQ
>
> OK I understand it, but have no idea how to apply the method?
>
> Thanks
>

Call the function with three outputs.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: Saga on
"Steven Lord" <slord(a)mathworks.com> wrote in message <hmoipk$av0$1(a)fred.mathworks.com>...
>
> "Saga " <a5stargamescompany(a)googlemail.com> wrote in message
> news:hmoh72$qvk$1(a)fred.mathworks.com...
> > "Steven Lord" <slord(a)mathworks.com> wrote in message
> > <hmoggi$as7$1(a)fred.mathworks.com>...
> >>
> >> "Saga " <a5stargamescompany(a)googlemail.com> wrote in message
> >> news:hmof3l$851$1(a)fred.mathworks.com...
> >> > Guys trying to create a polynomial formula but I go above order 5 i get
> >> > this error msg "Warning: Polynomial is badly conditioned. Add points
> >> > with distinct X
> >> > values, reduce the degree of the polynomial, or try centering
> >> > and scaling as described in HELP POLYFIT."
> >> >
> >> > I've looked at help, but there is no information there.
> >>
> >> Reread this section from the help:
> >>
> >> [P,S,MU] = POLYFIT(X,Y,N) finds the coefficients of a polynomial in
> >> XHAT = (X-MU(1))/MU(2) where MU(1) = MEAN(X) and MU(2) = STD(X). This
> >> centering and scaling transformation improves the numerical
> >> properties
> >> of both the polynomial and the fitting algorithm.
> >>
> >> --
> >> Steve Lord
> >> slord(a)mathworks.com
> >> comp.soft-sys.matlab (CSSM) FAQ:
> >> http://matlabwiki.mathworks.com/MATLAB_FAQ
> >
> > OK I understand it, but have no idea how to apply the method?
> >
> > Thanks
> >
>
> Call the function with three outputs.
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
>

Three outputs???

I only have (x,y,n)

The higher order I go it display the error.
Do you mean like this?

[P,S,MU] = POLYFIT(X,Y,N)

If yes what values are P,S and MU?

Thanks