I've looked at help, but there is no information there.
Thanks
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
sl...@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.
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
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.
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
*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.