From: pipa on

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

P, S and MU are the three outputs which u will get after you use the polyfit function.
From: Saga on
"pipa " <balwindersingh(a)gmail.com> wrote in message <hmpggv$oqg$1(a)fred.mathworks.com>...
>
> > 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?
>
> P, S and MU are the three outputs which u will get after you use the polyfit function.

Thanks but how would I use these values?
From: Steven Lord on

"Saga " <a5stargamescompany(a)googlemail.com> wrote in message
news:hmqod6$b5v$1(a)fred.mathworks.com...
> "pipa " <balwindersingh(a)gmail.com> wrote in message
> <hmpggv$oqg$1(a)fred.mathworks.com>...
>>
>> > 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?
>>
>> P, S and MU are the three outputs which u will get after you use the
>> polyfit function.
>
> Thanks but how would I use these values?
>

That depends on what you want to do with the polynomial after performing the
fitting -- me, I'd probably use then in a call to POLYVAL.

--
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 <hmr51c$rqm$1(a)fred.mathworks.com>...
>
> "Saga " <a5stargamescompany(a)googlemail.com> wrote in message
> news:hmqod6$b5v$1(a)fred.mathworks.com...
> > "pipa " <balwindersingh(a)gmail.com> wrote in message
> > <hmpggv$oqg$1(a)fred.mathworks.com>...
> >>
> >> > 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?
> >>
> >> P, S and MU are the three outputs which u will get after you use the
> >> polyfit function.
> >
> > Thanks but how would I use these values?
> >
>
> That depends on what you want to do with the polynomial after performing the
> fitting -- me, I'd probably use then in a call to POLYVAL.
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
>

When I don't use P, S and MU I write a = polyfit(x,y,6)

then to calculate the polynomial I write polyval(a,x)

Where would I insert P,S and MU?

Thanks
From: Steven Lord on

"Saga " <a5stargamescompany(a)googlemail.com> wrote in message
news:hmvq8k$9i0$1(a)fred.mathworks.com...
> "Steven Lord" <slord(a)mathworks.com> wrote in message
> <hmr51c$rqm$1(a)fred.mathworks.com>...

*snip*

> When I don't use P, S and MU I write a = polyfit(x,y,6)
>
> then to calculate the polynomial I write polyval(a,x)
>
> Where would I insert P,S and MU?

Read the help for POLYVAL -- it describes specifically how you use P, S, and
MU in a call to POLYVAL.

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