Re: User error? using polyfitn
- From: "Doug " <doug.lundin@xxxxxxxxx>
- Date: Tue, 31 Jul 2007 19:57:15 +0000 (UTC)
Hmmm, it works for a 2D dataset fitting a 3rd order polynomial:
n = 1000;
x = rand(n,2);
y = exp(sum(x,2)) + randn(n,1)/100;
p = polyfitn(x,y,3)
polyn2sympoly(p)
p =
ModelTerms: [10x2 double]
Coefficients: [1x10 double]
ParameterVar: [1x10 double]
ParameterStd: [1x10 double]
R2: 0.99992742747956
RMSE: 0.01089944081419
VarNames: {}
A scalar sympoly object
0.46252*X1^3 + 1.4378*X1^2*X2 + 0.032219*X1^2 + 1.4293*X1*X2^2 - 0.0059039*X1*X2 + 1.2647*X1 + 0.48075*X2^3 + 0.0057637*X2^2 + 1.2754*X2 + 0.95697
.
- Follow-Ups:
- Re: User error? using polyfitn
- From: dpb
- Re: User error? using polyfitn
- References:
- User error? using polyfitn
- From: Doug
- Re: User error? using polyfitn
- From: rotor
- Re: User error? using polyfitn
- From: Doug
- Re: User error? using polyfitn
- From: dpb
- User error? using polyfitn
- Prev by Date: Re: bug in rem
- Next by Date: Balancing arrays matlab command
- Previous by thread: Re: User error? using polyfitn
- Next by thread: Re: User error? using polyfitn
- Index(es):